This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB doesn't show the correct line


Daniel Jacobowitz wrote:
> 
> > I can only speculate that it's because of one of the standard headers
> > which are unique to this program. But they are from an ordinary
> > Debian/sarge system. How can I detect further where the offset is introduced?
> 
> The only things that I can recommend:
>   - Look at the preprocessor output (gcc -E).  See if there are missing
>     #line directives (usually just "# <num>" in preprocessor output).
>     The syntax of these things is really hard to read.
>   - Look at the debug info with readelf -wl and compare it to the
>     object code.
> 
Not a very nice prospect, I guess I won't be able to detect anything
useful within resonable time :-(

> It sounds like it is more likely to be a problem with GCC's output than
> GDB's parsing.
> 
I just inserted a syntax error in my source, at least GCC reports the
correct line number.

Can't this line number problem somehow detected within GDB? Sorry if I
ask this as someone without knowing any internals but IMO this would be
the best solution. My app is now working so I'm not in a hurry but a
good debugger is _essential_  for any development.

O. Wyss

-- 
See a huge pile of work at "http://wyodesktop.sourceforge.net/";


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]