473,379 Members | 1,201 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

#line directive makes gdb crazy ?

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
Jan 12 '07 #1
3 1929
# /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.
Jan 13 '07 #2
On Fri, 12 Jan 2007 14:53:18 +0100, Pawel <nu***@wp.plwrote 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
Jan 14 '07 #3
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: <mailto:Th*************@gmail.com>

Jan 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robert | last post by:
I am using the php4-cgi Debian package which is based on PHP 4.3.4. I have problems when running php4 on the command line. If I say something like $ php4 index.cgi a number of variables...
2
by: Mantorok Redgormor | last post by:
what is the purpose of the #line directive? how is it suppose to be used? I didn't see it mentioned in the faq and I can't make any sense of it from the standard. -- nethlek
1
by: vishal | last post by:
What does #line 182 parser.y mean in a C program?
4
by: Cal Lidderdale | last post by:
My input line is i1,i2,i3,i4,i5,i6,i7,i8^,...i596,597, ... 14101,14102...NL/CR very long line of data - I only want the first 8 items and the delimiter between 8 & 9 is a carrot "^". The line...
14
by: Vlad | last post by:
Please consider this code public class MyClass{ public bool MyMethod1(){ return false; } public bool MyMethod2(){ int x=0,y=1/x; return false; }
11
by: Jeff | last post by:
Hi - I'm trying to get my ASP.NET pages to work the same way on my development machine (running from the VS.NET IDE) and on a remote (3rd-party) server. The only way I've been able to come up...
11
by: xdevel | last post by:
Hi, I don't understand option. if I write: #line 100 "file" I change file numeration to start to line 100 but what "file" ? any example?
1
by: todWulff | last post by:
Good day folks. Let me open with the statement that I am not a C++/C programmer. The environment that I am programming in is ARMbasic, an embedded BASIC targeted toward ARM-based...
7
by: J.H.Kim | last post by:
Hi, everyone I saw the preprocessor "#line " in some source codes. It was like this : #line 2972 "ifupdown.nw" Please tell me what is the meaning of that "#line"? Thanks in advance.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.