This is the mail archive of the gdb-patches@sources.redhat.com 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]

[RFA] Watchpoint test tweak


This tweak is for a gdb that by default would support hardware 
watchpoints, but under certain circumstances cannot.  For instance,
you might have a native Solaris or Linux gdb, but be testing it on
an embedded stub.  The tweak allows you to set up the testsuite 
to automatically disable hardware watchpoints.

2000-10-17  Michael Snyder  <msnyder@cleaver.cygnus.com>

        * gdb.base/watchpoint.exp (proc initialize): This nit allows
        default hardware watchpoints to be disabled if appropriate.
        (proc test_watchpoint_triggered_in_syscall): Use new gdb.exp
        routine gdb_skip_stdio_test.

Index: watchpoint.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/watchpoint.exp,v
retrieving revision 1.48
diff -c -3 -p -r1.48 watchpoint.exp
*** watchpoint.exp      2000/08/11 00:28:29     1.48
--- watchpoint.exp      2000/10/17 23:57:04
*************** proc initialize {} {
*** 63,68 ****
--- 63,72 ----
      global srcfile
      global wp_set
  
+     if [target_info exists gdb,no_hardware_watchpoints] {
+       gdb_test "set can-use-hw-watchpoints 0" "" ""
+     }
+ 
      if [gdb_test "break marker1" "Breakpoint 1 at $hex: file
.*$srcfile, line $decimal.*" "set breakpoint at marker1" ] { 
        return 0; 
      }
*************** proc test_stepping {} {
*** 460,468 ****
  proc test_watchpoint_triggered_in_syscall {} {
      global gdb_prompt
  
!     if [target_info exists gdb,noinferiorio] {
!       verbose "Skipping test_watchpoint_triggered_in_syscall due to
noinferiorio"
!       return
      }
      # Run until we get to the first marker function.
      set x 0
--- 464,471 ----
  proc test_watchpoint_triggered_in_syscall {} {
      global gdb_prompt
  
!     if [gdb_skip_stdio_test "watchpoints triggered in syscall"] {
!       return;
      }
      # Run until we get to the first marker function.

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