aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-11-06 15:21:24 +0000
committerTom Tromey <tromey@redhat.com>2012-11-06 15:21:24 +0000
commit2d338fa948bca672c696ce23da905bddbbc374b4 (patch)
tree4c68d87ba638c046c890a6557c436f051f995edc /gdb/testsuite/gdb.arch
parent234fa27ce099ad5ef763209f8818fc2bf499f26c (diff)
downloadgdb-2d338fa948bca672c696ce23da905bddbbc374b4.zip
gdb-2d338fa948bca672c696ce23da905bddbbc374b4.tar.gz
gdb-2d338fa948bca672c696ce23da905bddbbc374b4.tar.bz2
* gdb.threads/gcore-thread.exp: Use gdb_gcore_cmd.
* gdb.python/py-strfns.exp (test_strfns_core_file): Use gdb_gcore_cmd. * gdb.cell/gcore.exp: Use gdb_gcore_cmd. * gdb.base/gcore.exp: Use gdb_gcore_cmd. * gdb.base/gcore-relro.exp: Use gdb_gcore_cmd. * gdb.base/gcore-buffer-overflow.exp: Use gdb_gcore_cmd. * gdb.base/auxv.exp: Use gdb_gcore_cmd. * gdb.arch/vsx-regs.exp: Use gdb_gcore_cmd. * gdb.arch/system-gcore.exp: Use gdb_gcore_cmd. * gdb.arch/pa-nullify.exp (test_core_bt): Use gdb_gcore_cmd. * lib/gdb.exp (gdb_gcore_cmd): New proc.
Diffstat (limited to 'gdb/testsuite/gdb.arch')
-rw-r--r--gdb/testsuite/gdb.arch/pa-nullify.exp20
-rw-r--r--gdb/testsuite/gdb.arch/system-gcore.exp19
-rw-r--r--gdb/testsuite/gdb.arch/vsx-regs.exp20
3 files changed, 5 insertions, 54 deletions
diff --git a/gdb/testsuite/gdb.arch/pa-nullify.exp b/gdb/testsuite/gdb.arch/pa-nullify.exp
index e3223d9..2ad3af6 100644
--- a/gdb/testsuite/gdb.arch/pa-nullify.exp
+++ b/gdb/testsuite/gdb.arch/pa-nullify.exp
@@ -107,26 +107,8 @@ gdb_test "stepi" "in main.*" "stepi to main"
proc gen_core { test } {
global gcorefile
- global gdb_prompt
- set gcore_works 0
- set escapedfilename [string_to_regexp $gcorefile]
-
- # gcore is not yet implemented for HPUX
- setup_xfail hppa*-*-hpux*
-
- gdb_test_multiple "gcore $gcorefile" "$test: gcore" {
- -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
- pass "$test: gcore"
- set gcore_works 1
- }
- -re "Undefined command.*$gdb_prompt $" {
- fail "$test: gcore (undefined command)"
- }
- -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
- fail "$test: gcore (can't create corefile)"
- }
- }
+ set gcore_works [gdb_gcore_cmd $gcorefile "$test: gcore"]
return $gcore_works
}
diff --git a/gdb/testsuite/gdb.arch/system-gcore.exp b/gdb/testsuite/gdb.arch/system-gcore.exp
index ab97f69..f631b45 100644
--- a/gdb/testsuite/gdb.arch/system-gcore.exp
+++ b/gdb/testsuite/gdb.arch/system-gcore.exp
@@ -95,23 +95,8 @@ set pre_corefile_local_array \
set pre_corefile_extern_array \
[capture_command_output "print extern_array" "$print_prefix"]
-set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
-
-set core_supported 0
-gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
- "save a corefile" \
-{
- -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
- pass "save a corefile"
- global core_supported
- set core_supported 1
- }
- -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
- unsupported "save a corefile"
- global core_supported
- set core_supported 0
- }
-}
+set core_supported [gdb_gcore_cmd "${objdir}/${subdir}/gcore.test" \
+ "save a corefile"]
if {!$core_supported} {
return -1
diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp
index d015787..5f23444 100644
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp
@@ -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 core_supported [gdb_gcore_cmd "${objdir}/${subdir}/vsx-core.test" \
+ "Save a VSX-enabled corefile"]
# Now run the F32~F63/VR0~VR31 tests.