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]

stabs at function entry point?


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.  Meanwhile,
comments in function.c:thread_prologue_and_epilogue_insns() suggest
that this was the intent all along:

           GDB handles `break f' by setting a breakpoint on the first
           line note after the prologue.  Which means (1) that if
           there are line number notes before where we inserted the
           prologue we should move them, and (2) we should generate a
           note before the end of the first basic block, if there isn't
           one already there.

but a comment in init_function_start suggests otherwise:

      Also tell final how to output a linenum before the function prologue.

OK, I can fix this:  easiest is simply to change
dbx_debug_hooks.begin_prologue so it doesn't emit the line
number.  What I don't know is how widely this change is applicable.
Is this an appropriate thing to do for gdb on other targets?  Will
it break a real dbx, and if so do we care?  Which of the above-quoted
comments correctly indicates the intent?


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