Re: Examining copied stack contents

Joel Brobecker
2010-07-05T20:27:15Z

There are several possible ways to do callstack unwinding on each
architecture. The prefered way is to rely on DWARF frame info, but
we otherwise fallback on other methods (either native unwinding
info, or if all else fails, prologue parsing). That's why the GDB
code for each architecture registers "sniffers" which will tell GDB
for each frame which unwinder would be best to use. The result also
depends on the type of frame, since signal frames often require their
own unwinder.

I recommend that you have a look at i386-tdep.c, and in particular
the various functions specified in the i386_frame_unwind structure.
That should help you find out what is actually going on inside GDB.

--
Joel