From 58d69f296623db4b6b6e960d2302c8899a7b706e Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 9 Sep 2007 21:31:00 +0000 Subject: * gdb.base/gcore-buffer-overflow.exp: Check whether gdb supports gcore, before continuing with the test. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/gcore-buffer-overflow.exp | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'gdb') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c9ffd0e..b7ecb21 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-09-09 Mark Kettenis + + * gdb.base/gcore-buffer-overflow.exp: Check whether gdb supports + gcore, before continuing with the test. + 2007-09-06 Daniel Jacobowitz * gdb.mi/mi2-watch.exp: Set can-use-hw-watchpoints to 0 if required. 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" -- cgit v1.1