From: Daniel Jacobowitz <drow@false.org>
To: Stefan Bylund <steby@enea.se>
Cc: gdb@sourceware.org
Subject: Re: Does GDB 6.7.1 for PowerPC require the framepointer register for backtracing?
Date: Mon, 11 Feb 2008 13:08:00 -0000 [thread overview]
Message-ID: <20080211130757.GB7796@caradoc.them.org> (raw)
In-Reply-To: <47B02B7D.40204@enea.se>
On Mon, Feb 11, 2008 at 12:03:25PM +0100, Stefan Bylund wrote:
> Hi,
>
> We recently upgraded from GDB 6.3 to GDB 6.7.1 and noticed that for
> PowerPC we can longer get a backtrace in certain cases. The problem is
> that when we initially attach to an existing process on a remote target,
> only the PC and SP registers are available. This worked fine with GDB 6.3
> when doing a backtrace. However, GDB 6.7.1 fails when doing a backtrace in
> this case, and it seems that it tries to use the framepointer register
> (R31) for doing the backtrace and since this register is not available
> (i.e. it has value 0 in GDB's perspective), the backtrace fails.
>
> Does GDB 6.7.1 requires the framepoint register (R31) for doing a backtrace?
It depends on your program and the available symbols and unwind
information. For instance, it will use DWARF unwind tables if
they are provided.
> I have also noticed that if I don't install the dwarf2_frame_sniffer()
> and rs6000_adjust_frame_regnum() functions in rs6000_gdbarch_init() in
> rs6000-tdep.c, the backtrace works again even if the framepointer
> register is not available. However, I'm not sure exactly why... Is it
> safe to omit these two functions?
It sounds to me like you have DWARF information that says to use the
frame pointer. Do you know if that's true?
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-02-11 13:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 11:03 Stefan Bylund
2008-02-11 13:08 ` Daniel Jacobowitz [this message]
2008-02-11 17:29 ` Stefan Bylund
2008-02-11 17:33 ` Daniel Jacobowitz
2008-02-12 10:24 ` Stefan Bylund
2008-02-12 13:31 ` Daniel Jacobowitz
2008-02-12 15:21 ` Stefan Bylund
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=20080211130757.GB7796@caradoc.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=steby@enea.se \
/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