public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/31418] New: [gdb/tdep, arm] $tpidruro unavailable
@ 2024-02-27 16:16 vries at gcc dot gnu.org
2024-02-27 16:17 ` [Bug tdep/31418] " vries at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-27 16:16 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31418
Bug ID: 31418
Summary: [gdb/tdep, arm] $tpidruro unavailable
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: tdep
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
As earlier reported here (
https://sourceware.org/pipermail/gdb-patches/2024-February/206644.html ):
...
$ 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>
...
This is on a pinebook, with 64-bit kernel and 32-bit userland.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tdep/31418] [gdb/tdep, arm] $tpidruro unavailable
2024-02-27 16:16 [Bug tdep/31418] New: [gdb/tdep, arm] $tpidruro unavailable vries at gcc dot gnu.org
@ 2024-02-27 16:17 ` vries at gcc dot gnu.org
2024-02-27 21:50 ` thiago.bauermann at linaro dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-27 16:17 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31418
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
As mentioned here (
https://sourceware.org/pipermail/gdb-patches/2024-February/206847.html ),
Thiago is working on a patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tdep/31418] [gdb/tdep, arm] $tpidruro unavailable
2024-02-27 16:16 [Bug tdep/31418] New: [gdb/tdep, arm] $tpidruro unavailable vries at gcc dot gnu.org
2024-02-27 16:17 ` [Bug tdep/31418] " vries at gcc dot gnu.org
@ 2024-02-27 21:50 ` thiago.bauermann at linaro dot org
2024-02-29 15:33 ` cvs-commit at gcc dot gnu.org
2024-03-04 15:18 ` vries at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: thiago.bauermann at linaro dot org @ 2024-02-27 21:50 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31418
Thiago Jung Bauermann <thiago.bauermann at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thiago.bauermann at linaro dot org
--- Comment #2 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
Thank you for opening this bug. I posted the patch here:
https://inbox.sourceware.org/gdb-patches/20240227214851.350579-1-thiago.bauermann@linaro.org/
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tdep/31418] [gdb/tdep, arm] $tpidruro unavailable
2024-02-27 16:16 [Bug tdep/31418] New: [gdb/tdep, arm] $tpidruro unavailable vries at gcc dot gnu.org
2024-02-27 16:17 ` [Bug tdep/31418] " vries at gcc dot gnu.org
2024-02-27 21:50 ` thiago.bauermann at linaro dot org
@ 2024-02-29 15:33 ` cvs-commit at gcc dot gnu.org
2024-03-04 15:18 ` vries at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-29 15:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31418
--- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thiago Bauermann
<bauermann@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bbb12eb9c84aa2b32480b7c022c494c2469ef717
commit bbb12eb9c84aa2b32480b7c022c494c2469ef717
Author: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Date: Mon Feb 26 19:11:45 2024 -0300
gdb/arm: Remove tpidruro register from non-FreeBSD target descriptions
Commit 92d48a1e4eac ("Add an arm-tls feature which includes the tpidruro
register from CP15.") introduced the org.gnu.gdb.arm.tls feature, which
adds the tpidruro register, and unconditionally enabled it in
aarch32_create_target_description.
In Linux, the tpidruro register isn't available via ptrace in the 32-bit
kernel but it is available for an aarch32 program running under an arm64
kernel via the ptrace compat interface. This isn't currently implemented
however, which causes GDB on arm-linux with 64-bit kernel to list the
register but show it as unavailable, as reported by Tom de Vries:
$ gdb -q -batch a.out -ex start -ex 'p $tpidruro'
Temporary breakpoint 1 at 0x512
Temporary breakpoint 1, 0xaaaaa512 in main ()
$1 = <unavailable>
Simon Marchi then clarified:
> 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.
Therefore, disable the TLS feature in aarch32 target descriptions for Linux
and NetBSD targets (the latter also doesn't seem to support accessing
tpidruro either, based on a quick look at arm-netbsd-nat.c).
This patch fixes the following tests:
Running gdb.base/inline-frame-cycle-unwind.exp ...
FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 3: backtrace
when the unwind is broken at frame 3
FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 5: backtrace
when the unwind is broken at frame 5
FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 1: backtrace
when the unwind is broken at frame 1
Tested with Ubuntu 22.04.3 on armv8l-linux-gnueabihf in native,
native-gdbserver and native-extended-gdbserver targets with no regressions.
PR tdep/31418
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31418
Approved-By: John Baldwin <jhb@FreeBSD.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tdep/31418] [gdb/tdep, arm] $tpidruro unavailable
2024-02-27 16:16 [Bug tdep/31418] New: [gdb/tdep, arm] $tpidruro unavailable vries at gcc dot gnu.org
` (2 preceding siblings ...)
2024-02-29 15:33 ` cvs-commit at gcc dot gnu.org
@ 2024-03-04 15:18 ` vries at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-04 15:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31418
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |15.1
Status|NEW |RESOLVED
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-04 15:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 16:16 [Bug tdep/31418] New: [gdb/tdep, arm] $tpidruro unavailable vries at gcc dot gnu.org
2024-02-27 16:17 ` [Bug tdep/31418] " vries at gcc dot gnu.org
2024-02-27 21:50 ` thiago.bauermann at linaro dot org
2024-02-29 15:33 ` cvs-commit at gcc dot gnu.org
2024-03-04 15:18 ` vries at gcc dot gnu.org
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).