#line directive makes gdb crazy ?

P

Pawel

Hallo Newsgroup Readers


I have the following function in the code I am trying to debug:

/usr/src/redhat/BUILD/ethereal-0.10.14/epan/dissectors/packet-h225.c:
static int
dissect_h225_T_h4501SupplementaryService_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
#line 459 "h225.cnf"
tvbuff_t *h4501_tvb = NULL;

offset = dissect_per_octet_string(tvb, offset, pinfo, tree, hf_index,
NO_BOUND, NO_BOUND, &h4501_tvb);

if (h4501_tvb && tvb_length(h4501_tvb)) {
call_dissector(h4501_handle, h4501_tvb, pinfo, tree);
}


return offset;
}

now when I am debugging with gdb some other function that calls the one above, I get error:
459 h225.cnf: No such file or directory.
in h225.cnf

h225.cnf file does not exist

Have You got idea on how to make gdb work correctly.

Regards,
Pawel
 
S

SM Ryan

# /usr/src/redhat/BUILD/ethereal-0.10.14/epan/dissectors/packet-h225.c:
# static int
# dissect_h225_T_h4501SupplementaryService_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
# #line 459 "h225.cnf"

# now when I am debugging with gdb some other function that calls the one above, I get error:
# 459 h225.cnf: No such file or directory.
# in h225.cnf
#
# h225.cnf file does not exist
#
# Have You got idea on how to make gdb work correctly.

gdb is working correctly. All it has is the object file and your claim of where it came from. The claim is wrong and must be revised: if you are compiling the source code, you can remove the line number directives before compiling. There may be compiler and/or pre-processor options to do so; you can also write short filter programs to do so.
 
J

Jack Klein

Hallo Newsgroup Readers


I have the following function in the code I am trying to debug:

/usr/src/redhat/BUILD/ethereal-0.10.14/epan/dissectors/packet-h225.c:
static int
dissect_h225_T_h4501SupplementaryService_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
#line 459 "h225.cnf"
tvbuff_t *h4501_tvb = NULL;

offset = dissect_per_octet_string(tvb, offset, pinfo, tree, hf_index,
NO_BOUND, NO_BOUND, &h4501_tvb);

if (h4501_tvb && tvb_length(h4501_tvb)) {
call_dissector(h4501_handle, h4501_tvb, pinfo, tree);
}


return offset;
}

now when I am debugging with gdb some other function that calls the one above, I get error:
459 h225.cnf: No such file or directory.
in h225.cnf

h225.cnf file does not exist

Have You got idea on how to make gdb work correctly.

You need to ask this question in a group that supports gdb, perhaps
one in the gnu.* family. The language itself does not specify how to
make debuggers work, this is a tool question, not a language one.
 
K

Kenneth Brody

Pawel said:
Hallo Newsgroup Readers

I have the following function in the code I am trying to debug:

/usr/src/redhat/BUILD/ethereal-0.10.14/epan/dissectors/packet-h225.c:
static int
dissect_h225_T_h4501SupplementaryService_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
#line 459 "h225.cnf"
tvbuff_t *h4501_tvb = NULL; [...]

now when I am debugging with gdb some other function that calls the one above, I get error:
459 h225.cnf: No such file or directory.
in h225.cnf

h225.cnf file does not exist

Have You got idea on how to make gdb work correctly.

Yes... Stop lying to it.

You have told it that the source code came from "h225.cnf" on line
459, yet that file does not exist.

For more info, you'll either need to ask in a group that deals with
gdb, or with Linux kernel stuff. (Assuming that the above is from
a Linux kernel build.)

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top