From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Tom de Vries <tdevries@suse.de>
Cc: Kevin Buettner <kevinb@redhat.com>,
Luis Machado <luis.machado@arm.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH v2] [gdb] Fix "value is not available" with debug frame
Date: Mon, 26 Feb 2024 19:34:02 -0300 [thread overview]
Message-ID: <877ciqg8it.fsf@linaro.org> (raw)
In-Reply-To: <60882190-1fd7-45fc-a19b-661c027df154@suse.de>
Tom de Vries <tdevries@suse.de> writes:
> This doesn't depend on debug info. The test-case depends on a register being unavailable.
> I don't know if or how we can reliably enforce this condition in a test-case.
>
> To give some more detail, a minimal way to show the register as unavailable is:
> ...
> $ gcc hello.c
> $ gdb -q -batch a.out -ex start -ex 'p $tpidruro'
> Temporary breakpoint 1 at 0x512
>
> Temporary breakpoint 1, 0xaaaaa512 in main ()
> $1 = <unavailable>
> ...
>
> I'm not sure why it's unavailable.
>
> It seems the register was added as part of some tls support for fbsd arm tdep. It could
> be that support for the register is missing in linux arm tdep.
>
> It also could be a kernel problem (used kernel is 4.4.190).
I did a bit of digging today and the $tpidruro register isn't available
via ptrace in the 32-bit Linux kernel, but it is available for an
aarch32 program running under an arm64 Linux kernel via the ptrace
compat interface.
Support for this isn't implemented in GDB however, so at least for now
IMHO it makes sense to disable the org.gnu.gdb.arm.tls feature in
arm-linux and arm-netbsd (which from a quick look at arm-netbsd-nat.c
also doesn't seem to support accessing $tpidruro either).
I'm testing a patch that does this and I'll post it if there are no
regressions.
--
Thiago
next prev parent reply other threads:[~2024-02-26 22:34 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
2024-02-18 13:30 ` Tom de Vries
2024-02-26 14:34 ` Tom de Vries
2024-02-26 22:34 ` Thiago Jung Bauermann [this message]
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=877ciqg8it.fsf@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=luis.machado@arm.com \
--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