From: Kevin Buettner <kevinb@redhat.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] [gdb] Fix "value is not available" with debug frame
Date: Sat, 17 Feb 2024 21:09:47 -0700 [thread overview]
Message-ID: <20240217210947.20211db0@f39-zbm-amd> (raw)
In-Reply-To: <20240213171718.8934-1-tdevries@suse.de>
Hi Tom,
On Tue, 13 Feb 2024 18:17:18 +0100
Tom de Vries <tdevries@suse.de> wrote:
> On arm-linux, with a started hello world, running "info frame" works fine, but
> when I set debug frame to on, I run into:
> ...
> (gdb) info frame
> ...
> [frame] frame_unwind_register_value: exit
> value is not available
> (gdb)
> ...
>
> The problem is here in frame_unwind_register_value:
> ...
> if (value->lazy ())
> gdb_printf (&debug_file, " lazy");
> else
> {
> int i;
> gdb::array_view<const gdb_byte> buf = value->contents ();
> ...
> where we call value->contents () while !value->entirely_available ().
>
> Fix this by checking value->entirely_available () and printing:
> ...
> [frame] frame_unwind_register_value: -> register=91 unavailable
> ...
>
> Tested on arm-linux.
The fix looks good to me.
I'm wondering about the test case though. Is it the case that the
failure depends on debug info from a particular compiler (or compiler
version)? If so, would it be possible to devise a test using the
DWARF assembler which would not be dependent on compiler output that
may change over time?
Kevin
next prev parent reply other threads:[~2024-02-18 4:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 17:17 Tom de Vries
2024-02-18 4:09 ` Kevin Buettner [this message]
2024-02-18 13:30 ` Tom de Vries
2024-02-26 14:34 ` Tom de Vries
2024-02-26 22:34 ` Thiago Jung Bauermann
2024-02-26 22:41 ` Simon Marchi
2024-02-27 16:19 ` Tom de Vries
2024-03-04 15:25 ` Luis Machado
2024-03-04 15:59 ` Tom de Vries
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=20240217210947.20211db0@f39-zbm-amd \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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