Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > #line directive makes gdb crazy ?

Reply
Thread Tools

#line directive makes gdb crazy ?

 
 
Pawel
Guest
Posts: n/a
 
      01-12-2007
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(tvbu ff_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
 
Reply With Quote
 
 
 
 
SM Ryan
Guest
Posts: n/a
 
      01-13-2007
# /usr/src/redhat/BUILD/ethereal-0.10.14/epan/dissectors/packet-h225.c:
# static int
# dissect_h225_T_h4501SupplementaryService_item(tvbu ff_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.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
A bunch of savages in this town.
 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      01-14-2007
On Fri, 12 Jan 2007 14:53:18 +0100, Pawel <(E-Mail Removed)> wrote in
comp.lang.c:

> 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(tvbu ff_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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
 
Reply With Quote
 
Kenneth Brody
Guest
Posts: n/a
 
      01-15-2007
Pawel wrote:
>
> 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(tvbu ff_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: <(E-Mail Removed)>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging with gdb: pystack macro for gdb to show python stack trace Timothy Madden Python 1 09-17-2009 11:47 AM
GDB - no debugging symbols found (GDB Vs GCC?) seba C++ 1 03-22-2007 02:02 PM
Capturing gdb output in pyhton script using gdb -batch -x arguments Surendra Python 0 03-23-2006 02:47 PM
crazy browser go crazy dr greg Computer Support 7 01-14-2005 09:13 PM
The 'Location' attribute is not supported by the 'OutPutCache' directive????when i set in the directive .NET Follower ASP .Net 1 02-13-2004 10:32 AM



Advertisments