Re: Debugging a frameless function

Eli Zaretskii
2009-05-02T09:23:03Z

> Date: Wed, 29 Apr 2009 21:08:44 +0200 (CEST)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> CC: drow@false.org, gdb@sourceware.org
>
> > > Date: Wed, 29 Apr 2009 14:39:46 -0400
> > > From: Daniel Jacobowitz <drow@false.org>
> > > Cc: gdb@sourceware.org
> >
> > Thanks for responding.
> >
> > > Sounds like the debug info is bad.
> >
> > But then why does GDB 6.1 have no problems debugging the same binary?
>
> Did GDB 6.1 have the DWARF2 frame unwinder enabled for DJGPP?

Interestingly, it did, at least if my reading of the code is correct.

i386-tdep.c from GDB 6.1 says:

/* Hook in the DWARF CFI frame unwinder. */
frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);

whereas in current CVS we have this instead:

/* Hook in the DWARF CFI frame unwinder. */
dwarf2_append_unwinders (gdbarch);

and dwarf2_append_unwinders is simply

/* Append the DWARF-2 frame unwinders to GDBARCH's list. */
void
dwarf2_append_unwinders (struct gdbarch *gdbarch)
{
frame_unwind_append_unwinder (gdbarch, &dwarf2_frame_unwind);
frame_unwind_append_unwinder (gdbarch, &dwarf2_signal_frame_unwind);
}

So the only difference, beyond the code changes in the called
subroutines, is that in the current code base we also append an
unwinder for signal frames. But since DJGPP does not have such
frames, that isn't supposed to do any harm, is it?

TIA