aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-05-08 14:13:11 +0200
committerTom de Vries <tdevries@suse.de>2024-05-08 14:13:11 +0200
commit2236c5e384de20b0dd6b2fbc964a7269027cb2d9 (patch)
treed8e9d036c5294db37f90800496a00ebdfc076d6d /bfd
parentc144f638337944101131d9fe6de4ab908f6d4c2d (diff)
downloadgdb-2236c5e384de20b0dd6b2fbc964a7269027cb2d9.zip
gdb-2236c5e384de20b0dd6b2fbc964a7269027cb2d9.tar.gz
gdb-2236c5e384de20b0dd6b2fbc964a7269027cb2d9.tar.bz2
[gdb/python] Make gdb.UnwindInfo.add_saved_register more robust
On arm-linux, until commit bbb12eb9c84 ("gdb/arm: Remove tpidruro register from non-FreeBSD target descriptions") I ran into: ... FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 5: \ backtrace when the unwind is broken at frame 5 ... What happens is the following: - the TestUnwinder from inline-frame-cycle-unwind.py calls gdb.UnwindInfo.add_saved_register with reg == tpidruro and value "<unavailable>", - pyuw_sniffer calls value->contents ().data () to access the value of the register, which throws an UNAVAILABLE_ERROR, - this causes the TestUnwinder unwinder to fail, after which another unwinder succeeds and returns the correct frame, and - the test-case fails because it's counting on the TestUnwinder to succeed and return an incorrect frame. Fix this by checking for !value::entirely_available as well as valued::optimized_out in unwind_infopy_add_saved_register. Tested on x86_64-linux and arm-linux. Approved-By: Andrew Burgess <aburgess@redhat.com> PR python/31437 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31437
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions