public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Fix ERROR in gdb.python/py-breakpoint.exp
@ 2022-10-19  7:42 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-10-19  7:42 UTC (permalink / raw)
  To: gdb-patches

With test-case gdb.python/py-breakpoint.exp I run into:
...
(gdb) ERROR: tcl error sourcing gdb.python/py-breakpoint.exp.
ERROR: can't read "skip_hw_watchpoint_tests_p": no such variable
    while executing
"if {$skip_hw_watchpoint_tests_p} {
        gdb_test_no_output "set can-use-hw-watchpoints 0" ""
    }"
...

Fix this by adding the missing "global skip_hw_watchpoint_tests_p" in two
procs.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.python/py-breakpoint.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index 0451562f09b..c3215b13d5c 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -307,6 +307,7 @@ proc_with_prefix test_watchpoints { } {
 
 proc_with_prefix test_bkpt_internal { } {
     global srcfile testfile hex decimal
+    global skip_hw_watchpoint_tests_p
 
     # Start with a fresh gdb.
     clean_restart ${testfile}
@@ -354,6 +355,7 @@ proc_with_prefix test_bkpt_internal { } {
 
 proc_with_prefix test_bkpt_eval_funcs { } {
     global srcfile testfile hex decimal
+    global skip_hw_watchpoint_tests_p
 
     # Start with a fresh gdb.
     clean_restart ${testfile}

base-commit: 906f69cf65daa8fee1c1c94a5c2fb221ba02b40d
-- 
2.35.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-19  7:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19  7:42 [pushed] [gdb/testsuite] Fix ERROR in gdb.python/py-breakpoint.exp Tom de Vries

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).