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 Wednesday, March 13, 2002, at 01:11 PM, Richard Henderson wrote:

> On Tue, Mar 12, 2002 at 05:32:37PM -0800, Dale Johannesen wrote:
>> Our gdb guy, Jim Ingham, pointed out that gcc3 on Darwin (which uses
>> dbx-style debug info [stabs]) is generating the first line-number
>> stab in a function before the prologue.  Jim argues that it should
>> be after the prologue, and has convinced Stan and me.
>
> Perhaps I'm mis-remembering, but I thought the first line number stab
> goes with the very first instruction of the function, and the *second*
> line number stab goes after the prologue.

Yes, that is what happens now.  As a result, when you set a breakpoint
on a function, gdb (ours, anyway) stops at the first insn rather than
after the prologue, which means the parameters and stack traceback
don't show correctly.  Are you implying this should be fixed in gdb?
That was my first impression, but Jim convincingly argued otherwise.


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