diff options
author | Mark Kettenis <kettenis@gnu.org> | 2007-09-09 21:31:00 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2007-09-09 21:31:00 +0000 |
commit | 58d69f296623db4b6b6e960d2302c8899a7b706e (patch) | |
tree | 09e846e9e3cd1cac2e175b4847f3aa6ef554ac60 /gdb/testsuite/gdb.base | |
parent | cf557b5176bd8a8ad42f6f4ee296e356753fa4f5 (diff) | |
download | gdb-58d69f296623db4b6b6e960d2302c8899a7b706e.zip gdb-58d69f296623db4b6b6e960d2302c8899a7b706e.tar.gz gdb-58d69f296623db4b6b6e960d2302c8899a7b706e.tar.bz2 |
* gdb.base/gcore-buffer-overflow.exp: Check whether gdb supports
gcore, before continuing with the test.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/gcore-buffer-overflow.exp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp index 27905b5..27bed79 100644 --- a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp +++ b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp @@ -45,6 +45,25 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} +# Does this gdb support gcore? +send_gdb "help gcore\n" +gdb_expect { + -re "Undefined command: .gcore.*$gdb_prompt $" { + # gcore command not supported -- nothing to test here. + unsupported "gdb does not support gcore on this target" + return -1; + } + -re "Save a core file .*$gdb_prompt $" { + pass "help gcore" + } + -re ".*$gdb_prompt $" { + fail "help gcore" + } + timeout { + fail "help gcore (timeout)" + } +} + gdb_test "set args ${pattern}" \ "" \ "Set buffer exceeding arguments" |