aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorNicholas Duffek <nsd@redhat.com>2000-11-17 16:24:48 +0000
committerNicholas Duffek <nsd@redhat.com>2000-11-17 16:24:48 +0000
commit30e87cd37230c673d7c3d675b6b278485ca2f225 (patch)
tree1a0df26aaf25d6f41eac995c01a49271e9a87dfa /gdb
parente346e481c291feba1459e983edb6c1e4a14deb86 (diff)
downloadgdb-30e87cd37230c673d7c3d675b6b278485ca2f225.zip
gdb-30e87cd37230c673d7c3d675b6b278485ca2f225.tar.gz
gdb-30e87cd37230c673d7c3d675b6b278485ca2f225.tar.bz2
* gdb.base/break.exp: Test backtrace and finish from called
function on all platforms, not just HP-UX.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/break.exp34
2 files changed, 24 insertions, 15 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7dd18b0..ece06ba 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-17 Nick Duffek <nsd@redhat.com>
+
+ * gdb.base/break.exp: Test backtrace and finish from called
+ function on all platforms, not just HP-UX.
+
2000-11-03 Michael Snyder <msnyder@cleaver.cygnus.com>
* config/monitor.exp (gdb_target_cmd): Abstracts some of the
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index aa9fba5..7e2bbac 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -577,31 +577,35 @@ gdb_expect {
# As long as we're stopped (breakpointed) in a called function,
# verify that we can successfully backtrace & such from here.
#
-
-if [istarget "hppa*-*-hpux*"] then {
- send_gdb "bt\n"
- gdb_expect {
- -re "#0\[ \t\]*$hex in marker2.*:4\[49\]\r\n#1.*_sr4export.*$gdb_prompt $"\
- {pass "backtrace while in called function"}
- -re "#0\[ \t\]*$hex in marker2.*:4\[49\]\r\n#1.*function called from gdb.*$gdb_prompt $"\
-
+# In this and the following test, the _sr4export check apparently is needed
+# for hppa*-*-hpux.
+#
+send_gdb "bt\n"
+gdb_expect {
+ -re "#0\[ \t\]*$hex in marker2.*:4\[49\]\r\n#1.*_sr4export.*$gdb_prompt $"\
{pass "backtrace while in called function"}
+ -re "#0\[ \t\]*($hex in )?marker2.*:4\[49\]\r\n#1.*function called from gdb.*$gdb_prompt $"\
+ {pass "backtrace while in called function"}
-re "$gdb_prompt $"\
{fail "backtrace while in called function"}
timeout {fail "(timeout) backtrace while in called function"}
- }
- send_gdb "finish\n"
- gdb_expect {
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.* in _sr4export.*$gdb_prompt $"\
+}
+
+# Return from the called function. For remote targets, it's important to do
+# this before runto_main, which otherwise may silently stop on the dummy
+# breakpoint inserted by GDB at the program's entry point.
+#
+send_gdb "finish\n"
+gdb_expect {
+ -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.* in _sr4export.*$gdb_prompt $"\
{pass "finish from called function"}
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*function called from gdb.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*function called from gdb.*$gdb_prompt $"\
{pass "finish from called function"}
- -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*Value returned.*$gdb_prompt $"\
+ -re "Run till exit from .*marker2.* at .*4\[49\]\r\n.*Value returned.*$gdb_prompt $"\
{pass "finish from called function"}
-re "$gdb_prompt $"\
{fail "finish from called function"}
timeout {fail "(timeout) finish from called function"}
- }
}
# Verify that GDB responds gracefully to a "finish" command with