From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simark@simark.ca>,
Thiago Jung Bauermann <thiago.bauermann@linaro.org>
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: Tue, 27 Feb 2024 17:19:29 +0100 [thread overview]
Message-ID: <d338cc47-d48f-41ca-95b6-f52056b3a6fd@suse.de> (raw)
In-Reply-To: <38d9df8e-75f0-4a28-833c-06429ab94ccd@simark.ca>
On 2/26/24 23:41, Simon Marchi wrote:
> On 2/26/24 17:34, Thiago Jung Bauermann wrote:
>>
>> 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.
>
> Thanks, I think that would make sense.
>
> The only time we should be seeing some "unavailable" registers or memory
> is in the context of tracepoints, for things that are not collected.
> Seeing an unavailable register here is a sign that something is not
> right.
In that case, I've filed a PR (
https://sourceware.org/bugzilla/show_bug.cgi?id=31418 ) to track this
problem.
Thanks,
- Tom
next prev parent reply other threads:[~2024-02-27 16:19 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
2024-02-26 22:41 ` Simon Marchi
2024-02-27 16:19 ` Tom de Vries [this message]
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=d338cc47-d48f-41ca-95b6-f52056b3a6fd@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=luis.machado@arm.com \
--cc=simark@simark.ca \
--cc=thiago.bauermann@linaro.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).