This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: stabs at function entry point?


On Wed, Mar 13, 2002 at 04:25:48PM -0800, Jim Ingham wrote:

> So my contention was that no one who is doing source level debugging 
> ever wants to break at the beginning of the prologue.  All sorts of 
> oddities happen then (the stack is wrong, the current frame is wrong, 
> etc) which from a source debugging point of view are hard to understand.
> 
> When Dale and I first discussed this, he suggested that gdb just throw 
> away the first source line stab for each function it encounters.  But if 
> gdb has to throw it away each time to get the debugging experience 
> right, then that seems a pretty strong argument in itself that the 
> compiler should not be emitting them...

Sorry to harp on, but these entries are NOT only useful for gdb. The
frame + stack problems are irrelevant for users of
bfd_get_nearest_line() who simply want the global symbol value for
the function to translate into a reasonable file/line pair.

A concrete example is my profiler: file/line output for function-based
summaries should be display the start of the function in the source.
There is also the lesser problem of hits against the prologue code
itself - ideally this would also work.

Please don't focus on what gdb needs at the expense of other users.
Are there real technical problems with ignoring the first stabs entry ?

thanks
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.


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