aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-11-11 15:30:44 +0100
committerTom de Vries <tdevries@suse.de>2022-11-11 15:30:44 +0100
commit4f04dba96d4783bae62e7fe4a5eace9fc414723d (patch)
treee6ef88a0d0419c82fde3a1700e3532666f3d88dd /gdbsupport
parent40b355f24ec288c29bc9d3dd569758b5e80b51e3 (diff)
downloadbinutils-4f04dba96d4783bae62e7fe4a5eace9fc414723d.zip
binutils-4f04dba96d4783bae62e7fe4a5eace9fc414723d.tar.gz
binutils-4f04dba96d4783bae62e7fe4a5eace9fc414723d.tar.bz2
[gdb/testsuite] Better error checking in has_hw_wp_support
With gdb 12.1, on powerpc64le I ran into ERRORs related to has_hw_wp_support usage, which was already fixed on trunk by commits: - 13f72372413 ("gdb/testsuite: fix gdb.base/break-idempotent.exp on ppc"), and - 01a32ee0b8c ("PowerPC, fix gdb.base/watchpoint.exp on Power 9") While looking into these ERRORs and the commits that fix them, it occurred to me that while the commits fix the root cause, the failure mode is not great. The test-cases expect a running instance of gdb upon return, which is not there, so there's an long stream of ERRORs generated as a result. Fix this at the start of has_hw_wp_support, by (instead of accomodating a running gdb instance by calling gdb_exit), checking whether it's called without a running gdb instance, and erroring out otherwise. This way, there's just one error. I also noticed that in case we do an early exit due to !runto_main, we don't clean up, so copy the missing cleanups (gdb_exit and $obj file deletion) from the regular exit. Tested on x86_64-linux, using has_hw_wp_support for x86_64 in skip_hw_watchpoint_tests.
Diffstat (limited to 'gdbsupport')
0 files changed, 0 insertions, 0 deletions