This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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]

How does gdb deal with bizarre frame descriptions?


I've been looking at the frame info for a main program
compiled on ubuntu with g++ (4.4.3), and the frame description
info, both for the eh_frame CFA and the DW_AT_frame_base
attribute is totally bizarre. The frame pointer is described
as being at *(ebp - 16) (for a certain range of addresses).

If I debug this program with gdb, it seems to get the frame
info correct, and apparently believes the frame pointer
is the ebp register (which seems to make sense if I
disassemble the code). If I look in *(ebp - 16) I see
trash.

What the devil is gdb doing to get this right? Is it
utterly ignoring the trash generated by the compiler and
deducing the frame description by disassembling the
prologue code or something?

gdb version: GNU gdb (GDB) 7.1-ubuntu
g++ version: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
architecture: i686


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