aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/tdesc.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-08-04 19:54:38 +0200
committerTom de Vries <tdevries@suse.de>2022-08-04 19:54:38 +0200
commit3c71833c67492ff23bf7f59b25720f06c5a4956f (patch)
treecaf5b666188421680a7d74040dc112a8ea55d351 /gdbsupport/tdesc.h
parent60adf22c1440723435262b9d867ebd76300c3325 (diff)
downloadgdb-3c71833c67492ff23bf7f59b25720f06c5a4956f.zip
gdb-3c71833c67492ff23bf7f59b25720f06c5a4956f.tar.gz
gdb-3c71833c67492ff23bf7f59b25720f06c5a4956f.tar.bz2
[gdb/testsuite] Fix ERROR in gdb.base/watchpoint-unaligned.exp
In PR23888 an error is reported: ... ERROR: tcl error sourcing watchpoint-unaligned.exp. ERROR: expected boolean value but got "" while executing "if {$wpnum} { ... This presumably happens when: - skip_hw_watchpoint_tests returns 0 meaning hw watchpoints are supported - gdb fails to set a hw watchpoint and instead sets a sw watchpoint That particular situation is handled for arm: ... -re "Watchpoint (\[0-9\]+): .*\r\n$gdb_prompt $" { if {[istarget "arm*-*-*"]} { untested $test set wpnum 0 } } ... but not for any other targets so wpnum remains "", triggering the ERROR. Possibly this has been fixed for powerpc by commit 8d4e4d13afb ("gdb Power 9 add test for HW watchpoint support."), but it's still possible for other targets. Fix this by: - initializing wpnum to 0 instead of "" - signalling the failure to set a hw watchpoint by a fail Tested on x86_64-linux, also by adding: ... gdb_test_no_output "set can-use-hw-watchpoints 0" ... and verifying that it triggers the fail. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23888
Diffstat (limited to 'gdbsupport/tdesc.h')
0 files changed, 0 insertions, 0 deletions