+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/gcore.exp: Issue an UNSUPPORTED and exit if we can't
+ create a core file.
+ * gdb.threads/gcore-thread.exp: Likewise.
+
2003-10-13 Corinna Vinschen <vinschen@redhat.com>
* gdb.base/call-rt-st.c (struct bit_flags_char_t): New bitfield
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 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
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
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