Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Horsley <horsley1953@gmail.com>
To: gdb@sourceware.org
Subject: How does gdb deal with bizarre frame descriptions?
Date: Tue, 18 May 2010 20:06:00 -0000	[thread overview]
Message-ID: <20100518160554.32fa67fc@tomh.ccur.com> (raw)

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


             reply	other threads:[~2010-05-18 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18 20:06 Tom Horsley [this message]
2010-05-19 22:42 ` Mike Frysinger
2010-05-20  0:21   ` Tom Horsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100518160554.32fa67fc@tomh.ccur.com \
    --to=horsley1953@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox