This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Always respect no_hardware_watchpoints in py-breakpoint.c


Hello,

one more Python remote testing bug: while py-breakpoint.exp does
consult the no_hardware_watchpoints flag at one point, and sets
can-use-hw-watchpoints accordingly, it thereafter kills and
restarts GDB, which causes the setting to be lost.

Fixed by re-setting the flag after every restart, if watchpoint
are to be tested.

Tested on arm-linux-gnueabi.
Committed to mainline.

Bye,
Ulrich


ChangeLog:

	* gdb.python/py-breakpoint.exp: Re-set can-use-hw-watchpoints
	flag after restarting GDB if necessary.

Index: gdb/testsuite/gdb.python/py-breakpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-breakpoint.exp,v
retrieving revision 1.10
diff -u -p -r1.10 py-breakpoint.exp
--- gdb/testsuite/gdb.python/py-breakpoint.exp	14 Mar 2011 16:09:55 -0000	1.10
+++ gdb/testsuite/gdb.python/py-breakpoint.exp	22 Jul 2011 17:34:25 -0000
@@ -186,6 +186,10 @@ gdb_test "continue" ".*\[Ww\]atchpoint.*
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
+# Disable hardware watchpoints if necessary.
+if [target_info exists gdb,no_hardware_watchpoints] {
+    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
+}
 if ![runto_main] then {
     fail "Cannot run to main."
     return 0
@@ -201,6 +205,10 @@ gdb_test "continue" ".*\[Ww\]atchpoint.*
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
+# Disable hardware watchpoints if necessary.
+if [target_info exists gdb,no_hardware_watchpoints] {
+    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
+}
 if ![runto_main] then {
     fail "Cannot run to main."
     return 0
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]