Ethereal-dev: [Ethereal-dev] help: new dissector debugging questions

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Wei Li (Michael)" <mich@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Apr 2004 16:21:44 -0500
Hi,
  There is sth weird when I am debugging a new dissector in Ethereal. During debugging, the execution order of program statements is not following the program flow. For example, in the following capture of debugging session, it jumpped around the statement 2105 quite a few times until finally execute it. I have never met such problems with GDB.
  By the way, after I successfully dissect the first two packets in the dump file, the program suddenly aborted because of failing on the following assertion: ** ERROR **: file tvbuff.c: line 379 (check_offset_length_no_exception): assertion failed: (tvb->initialized). Could anybody help me out here?
  Many thanks!
  Michael
 
PS: A sample debugging session:
2105            gchar * pdu_type_string = val_to_str(pdu_type, pdu_types,
(gdb) n
2092    {
(gdb) n
2105            gchar * pdu_type_string = val_to_str(pdu_type, pdu_types,
(gdb) n
2097        gchar * str = NULL;
(gdb) n
2101            proto_tree * argu_tree = NULL;
(gdb) print pdu_type_string
$14 = (gchar *) 0x0
(gdb) n
2102            proto_tree * subtree = NULL;
(gdb) n
2105            gchar * pdu_type_string = val_to_str(pdu_type, pdu_types,
(gdb) n
2108            ret = asn1_sequence_decode (asn1, &len, &header_length);
(gdb) print pdu_type_string
$15 = (gchar *) 0x0
(gdb) n
2105            gchar * pdu_type_string = val_to_str(pdu_type, pdu_types,
(gdb) print pdu_type_string
$16 = (gchar *) 0x4047f5c8 "System Status"