aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-10-13 16:30:45 +0000
committerDaniel Jacobowitz <drow@false.org>2003-10-13 16:30:45 +0000
commit7d605576a6ff0e9986a68e98b0a1893ce30e1f32 (patch)
tree19a6f5b23f0f02e8e370729aa8d4932b732c29a1 /gdb/testsuite/gdb.threads
parent64386c31df79fa199254c3099a9ca70b9bd2839e (diff)
downloadgdb-7d605576a6ff0e9986a68e98b0a1893ce30e1f32.zip
gdb-7d605576a6ff0e9986a68e98b0a1893ce30e1f32.tar.gz
gdb-7d605576a6ff0e9986a68e98b0a1893ce30e1f32.tar.bz2
* gdb.base/gcore.exp: Issue an UNSUPPORTED and exit if we can't
create a core file. * gdb.threads/gcore-thread.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.threads')
-rw-r--r--gdb/testsuite/gdb.threads/gcore-thread.exp22
1 files changed, 19 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index 5cb80bd..40c9ada 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
@@ -105,9 +105,25 @@ gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running"
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
# Drop corefile
-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