* gdb.base/gcore.exp: Issue an UNSUPPORTED and exit if we can't

create a core file.
	* gdb.threads/gcore-thread.exp: Likewise.
This commit is contained in:
Daniel Jacobowitz 2003-10-13 16:30:45 +00:00
parent 64386c31df
commit 7d605576a6
3 changed files with 45 additions and 7 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -1,4 +1,4 @@
# 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
@ -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

View File

@ -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