2012-02-21 Pedro Alves <palves@redhat.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi2-watch.exp
index fe2d0ac53977fe37065551b623263e0bc1e1893c..8aa0d946499bb3d375b068176ec41c5125200822 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright 1999-2004, 2007-2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -59,7 +58,7 @@ proc test_watchpoint_creation_and_listing {type} {
              "break-watch operation"
 
     mi_gdb_test "222-break-list" \
-           "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\",original-location=\"C\"\}\\\]\}" \
+           "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",what=\"C\",times=\"0\",original-location=\"C\"\}\\\]\}" \
                 "list of watchpoints"
 
 }
@@ -147,15 +146,11 @@ proc test_watchpoint_triggering {type} {
     clear_xfail *-*-*
 }
 
-proc test_watchpoint_all {type} {
-    global pf_prefix
+proc test_watchpoint_all {type} { with_test_prefix "$type" {
     upvar srcdir srcdir
     upvar subdir subdir
     upvar binfile binfile
 
-    set old_prefix $pf_prefix
-    lappend pf_prefix "$type:"
-
     mi_delete_breakpoints
     mi_gdb_reinitialize_dir $srcdir/$subdir
     mi_gdb_load ${binfile}
@@ -165,9 +160,7 @@ proc test_watchpoint_all {type} {
     #test_rwatch_creation_and_listing $type
     #test_awatch_creation_and_listing $type
     test_watchpoint_triggering $type
-
-    set pf_prefix $old_prefix
-}
+}}
 
 # Run the tests twice, once using software watchpoints...
 mi_gdb_test "567-gdb-set can-use-hw-watchpoints 0" \
This page took 0.025923 seconds and 4 git commands to generate.