This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: stabs at function entry point?
- From: Dale Johannesen <dalej at apple dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, gcc at gcc dot gnu dot org, Jim Ingham <jingham at apple dot com>
- Date: Wed, 13 Mar 2002 13:58:02 -0800
- Subject: 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.