diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/gcore.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/gcore.exp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp index 8c0ae8eb5c4..33fcba4810e 100644 --- a/gdb/testsuite/gdb.base/gcore.exp +++ b/gdb/testsuite/gdb.base/gcore.exp @@ -1,4 +1,4 @@ -# Copyright 2002 Free Software Foundation, Inc. +# Copyright 2002, 2003, 2004 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 @@ -61,7 +61,7 @@ gdb_expect { } } -if { ! [ runto main ] } then { +if { ! [ runto_main ] } then { gdb_suppress_entire_file "Run to main failed, so all tests in this file will automatically fail." } @@ -106,9 +106,25 @@ set pre_corefile_extern_array \ set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test] -gdb_test "gcore ${objdir}/${subdir}/gcore.test" \ - "Saved corefile ${escapedfilename}" \ - "save a corefile" +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 + } +} + +global core_supported +if {!$core_supported} { + return -1 +} # Now restart gdb and load the corefile. gdb_exit |