stabs at function entry point?
John Levon
levon@movementarian.org
Wed Mar 13 08:57:00 GMT 2002
On Wed, Mar 13, 2002 at 12:52:16AM -0800, Geoff Keating wrote:
> Line number comments are also used for the reverse mapping: Given a
> location, what source line corresponds to it?
Thanks for bringing this up.
> So, suppose the user stops at the first instruction of a function.
> What line should the debugger display? Hopefully, some line in the
> function. Thus, there should be at least one line-number stab at the
> very start of the function.
With our application (on x86) the situation is that gcc 2.91 and gcc3
have a debug entry that bfd_get_nearest_line can find, but gcc 2.95[.3]
does not. This means we get file.c:0 for gcc 2.95.3
gdb for that version correctly works out the line number, it looks like
it does it by advancing forward past the prologue. It looks like we'll
have to do something similar.
In short, it would be definitely useful if bfd_get_nearest_line on the
vma of the symbol for the function would return a sensible debug entry.
regards
john
--
I am a complete moron for forgetting about endianness. May I be
forever marked as such.
More information about the Gcc
mailing list