Index: gdb/testsuite/gdb.arch/vsx-regs.exp |
diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp |
index d015787763ac5aa026152ab5883f310d3f0a0d97..0ab111cb6cba334e7b51c04f47f879f3ca5dcb89 100644 |
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp |
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp |
@@ -1,4 +1,4 @@ |
-# Copyright (C) 2008-2012 Free Software Foundation, Inc. |
+# Copyright (C) 2008-2013 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 |
@@ -128,24 +128,8 @@ for {set i 0} {$i < 32} {incr i 1} { |
# later when loading the core file (i.e., different register values for different |
# vector register banks). |
-set escapedfilename [string_to_regexp ${objdir}/${subdir}/vsx-core.test] |
- |
-set core_supported 0 |
- |
-gdb_test_multiple "gcore ${objdir}/${subdir}/vsx-core.test" \ |
- "Save a VSX-enabled corefile" \ |
-{ |
- -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" { |
- pass "Save a VSX-enabled corefile" |
- global core_supported |
- set core_supported 1 |
- } |
- -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" { |
- unsupported "Save a VSX-enabled corefile" |
- global core_supported |
- set core_supported 0 |
- } |
-} |
+set corefile "${objdir}/${subdir}/vsx-core.test" |
+set core_supported [gdb_gcore_cmd "$corefile" "Save a VSX-enabled corefile"] |
# Now run the F32~F63/VR0~VR31 tests. |
@@ -184,31 +168,10 @@ gdb_start |
gdb_reinitialize_dir $srcdir/$subdir |
gdb_load ${binfile} |
-gdb_test_multiple "core ${objdir}/${subdir}/vsx-core.test" \ |
- "re-load generated corefile" \ |
-{ |
- -re ".* is not a core dump:.*$gdb_prompt $" { |
- fail "re-load generated corefile (bad file format)" |
- # No use proceeding from here. |
- return; |
- } |
- -re ".*: No such file or directory.*$gdb_prompt $" { |
- fail "re-load generated corefile (file not found)" |
- # No use proceeding from here. |
- return; |
- } |
- -re ".*Couldn't find .* registers in core file.*$gdb_prompt $" { |
- fail "re-load generated corefile (incomplete note section)" |
- } |
- -re "Core was generated by .*$gdb_prompt $" { |
- pass "re-load generated corefile" |
- } |
- -re ".*$gdb_prompt $" { |
- fail "re-load generated corefile" |
- } |
- timeout { |
- fail "re-load generated corefile (timeout)" |
- } |
+set core_loaded [gdb_core_cmd "$corefile" "re-load generated corefile"] |
+if { $core_loaded == -1 } { |
+ # No use proceeding from here. |
+ return |
} |
for {set i 0} {$i < 32} {incr i 1} { |