https://bugs.kde.org/show_bug.cgi?id=525478
Bug ID: 525478
Summary: Valgrind's vgdb extended-remote mode broken on aarch64
Classification: Developer tools
Product: valgrind
Version First 3.27 GIT
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Valgrind can cooperate with gdb using its vgdb extended-remote mode, as
described in the vgdb man page. This seems to work fine on x86_64, ppc64le, or
s390x. But not on aarch64. It seems like at GDB-16 times it did work with some
benign aarch64 specific warnings. But now with gdb-17 it stopped working
entirely on aarch64.
With a simple testcase C program under gdb, user can set remote exec-file ...
and target extended-remote | vgdb --multi --vargs -q, and then valgrind
examines the program under gdb as demonstrated e.g. here:
https://www.redhat.com/en/blog/valgrind-and-gdb-close-cooperation
Up to GDB-16 this did work, although on aarch64 there already were some
(unnotied) protocol errors. While on the non-aarch64 arches the process runs
like this:
> Reading symbols from ./ex...
> Remote debugging using | vgdb --multi --vargs -q
> Starting program: /tmp/tmp.iQcK0Aa5ve/ex
> relaying data between gdb and process 48184
> Loaded /usr/share/gdb/auto-load/valgrind-monitor.py
> Type "help valgrind" for more info.
> ==48184== Conditional jump or move depends on uninitialised value(s)
> ==48184== at 0x10000888: main (example.c:30)
> ==48184==
> Program received signal SIGTRAP, Trace/breakpoint trap.
On aarch64 it slightly misbehaved like this (notice the protocol error):
> Reading symbols from ./ex...
> Remote debugging using | vgdb --multi --vargs -q
> Starting program: /tmp/tmp.KDAhpTxT3o/ex
> relaying data between gdb and process 52784
> Protocol error: qXfer:features:read (target-features) conflicting enabled
> responses.
> Continuing.
> ==52784== Conditional jump or move depends on uninitialised value(s)
> ==52784== at 0x40083C: main (example.c:30)
> ==52784==
> Program received signal SIGTRAP, Trace/breakpoint trap.
So there already was the “protocol error” with GDB-16, but valgrind was still
able to correctly identify the expected C code problem. The testcase as a
whole did pass.
Now with GDB-17 the testcase started truly failing:
> Reading symbols from ./ex...
> Remote debugging using | vgdb --multi --vargs -q
> Starting program: /tmp/tmp.9zevMVoiNu/ex
> relaying data between gdb and process 53887
> ❌️ Protocol error: qXfer:features:read (target-features) conflicting enabled
> responses.
> ❌️ Cannot execute this command without a live selected thread.
> ❌️ Cannot execute this command without a live selected thread.
> ❌️ Cannot execute this command without a live selected thread.
That said with GDB-17, the testcase regressed on aarch64. It is 100%
reproducible.
FTR: RHEL bug: https://redhat.atlassian.net/browse/RHEL-256888
--
You are receiving this mail because:
You are watching all bug changes.