From: Simon Marchi <simark@simark.ca>
To: Roger Phillips <heidegg@hotmail.com>,
"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: How frame command with address works
Date: Wed, 8 Feb 2023 16:50:55 -0500 [thread overview]
Message-ID: <807c2500-1ed2-b886-b1ea-093a0971dfba@simark.ca> (raw)
In-Reply-To: <DM5PR06MB2555CD106ED3D112C7C5106FAAD89@DM5PR06MB2555.namprd06.prod.outlook.com>
On 2/8/23 05:01, Roger Phillips via Gdb wrote:
> Greetings,
>
> I have to analyze a coredump on an Aarch64 system. The callstack is
> broken so I only see the bottom frame. However, if I manually unwind
> the stack via $x29 register then I see what looks like intact stack
> frames. Now I try to use the frame / frame address command with the
> addresses from the $x29 registers which should point to the bases of
> the stackframes (the location where the address of the next frame is).
> However it always tells me "No frame at address ...".
>
> What does frame address need to correctly parse a frame?
I think you want to use the "frame view" or "select-frame view"
command, which lets you specify arbitrary SP and PC addresses. GDB
makes a frame_info object out of those and shows it to you.
It used to be that "frame <ADDRESS>" would do that, but it was
error-prone, as explained here, so was chanted to "frame view" and
"select-frame view":
https://gitlab.com/gnutools/binutils-gdb/-/commit/f67ffa6a785bee26bc23550670f85c6db578641f
I know a bit about that feature because it was in the way of some change
I wanted to do recently (frame_info_ptr, if someone wants to search the
git log). I think the intent of the feature is exactly your scenario.
However, I'm under the impression that it's a bit broken right now.
When selecting an arbitrary frame with "select-frame view", you can't do
up/down to see callers of that frame, and "backtrace" shows you the
"real" stack. I've been told that these commands used to work with
user-created frames though, probably a long time ago. But since that
feature wasn't tested at all, I guess it got broken.
Simon
next prev parent reply other threads:[~2023-02-08 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 10:01 Roger Phillips
2023-02-08 21:50 ` Simon Marchi [this message]
2023-02-09 10:43 ` Roger Phillips
2023-02-10 1:59 ` Simon Marchi
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=807c2500-1ed2-b886-b1ea-093a0971dfba@simark.ca \
--to=simark@simark.ca \
--cc=gdb@sourceware.org \
--cc=heidegg@hotmail.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).