aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-12-31 20:01:25 +0000
committerDaniel Jacobowitz <drow@false.org>2006-12-31 20:01:25 +0000
commit2fa63963cdcc84d690264e4dcf8dd3d7fbacf7d6 (patch)
tree6c96cc87c8400a7b5f487d3941b012db495f6652 /gdb/testsuite/gdb.base
parentfb70130a33bd21e42109cc11eff2d957d630f4f9 (diff)
downloadgdb-2fa63963cdcc84d690264e4dcf8dd3d7fbacf7d6.zip
gdb-2fa63963cdcc84d690264e4dcf8dd3d7fbacf7d6.tar.gz
gdb-2fa63963cdcc84d690264e4dcf8dd3d7fbacf7d6.tar.bz2
* gdb.base/annota1.exp: Allow .*printf in backtraces.
* gdb.base/annota3.exp: Likewise. * gdb.base/sigstep.exp (advancei): Fail if we hit the breakpoint again (instead of timing out). * gdb.gdb/selftest.exp (do_steps_and_nexts): Add an XFAIL for GCC bug 26475. * gdb.java/jmisc.exp: Adjust to work with method signatures including return types. Add kfails for GDB bugs 2214 and 2215. Move exit test from jmisc1.exp. * gdb.java/jmisc1.exp: Delete. * gdb.java/jprint.exp: Adjust to work with method signatures including return types. * gdb.objc/basicclass.exp: Update for gobjc 4.1 debug info. * gdb.threads/linux-dp.exp: Don't be confused by program output. * lib/java.exp (compile_java_from_source): Pass the correct type to target_compile.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp31
-rw-r--r--gdb/testsuite/gdb.base/annota3.exp6
-rw-r--r--gdb/testsuite/gdb.base/sigstep.exp5
3 files changed, 24 insertions, 18 deletions
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 7c8c0a7..97d0927 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -1,5 +1,5 @@
-# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
-# Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# 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
@@ -240,15 +240,16 @@ gdb_expect {
#
# get to printf
#
-send_gdb "continue\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "continue to printf" }
- -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\nwarning: Breakpoint 3 address previously adjusted from $hex to $hex.\r\n\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.printf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "continue to printf" }
+set pat_begin "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n"
+set pat_adjust "warning: Breakpoint 3 address previously adjusted from $hex to $hex.\r\n"
+set pat_end "\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.*printf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$"
- -re ".*$gdb_prompt$" { fail "continue to printf" }
- timeout { fail "continue to printf (timeout)" }
+send_gdb "continue\n"
+gdb_test_multiple "continue" "continue to printf" {
+ -re "${pat_begin}($pat_adjust)?$pat_end" {
+ pass "continue to printf"
+ }
+ -re ".*$gdb_prompt$" { fail "continue to printf" }
}
#
@@ -257,15 +258,17 @@ gdb_expect {
# annotate-frame-address
# annotate-frame-address-end
#
+set pat_begin "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\n.*printf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n"
+set pat_end "\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$"
send_gdb "backtrace\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" \
+ -re "$pat_begin$escapedsrcfile$pat_end"
{ pass "backtrace from shlibrary" }
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" \
+ -re "$pat_begin.*$srcfile$pat_end"
{ setup_xfail "*-*-*" 1270
fail "backtrace from shlibrary" }
- -re ".*$gdb_prompt$" { fail "backtrace from shlibrary" }
- timeout { fail "backtrace from shlibrary (timeout)" }
+ -re ".*$gdb_prompt$" { fail "backtrace from shlibrary" }
+ timeout { fail "backtrace from shlibrary (timeout)" }
}
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
index 055a7b5..0410fbf 100644
--- a/gdb/testsuite/gdb.base/annota3.exp
+++ b/gdb/testsuite/gdb.base/annota3.exp
@@ -1,4 +1,4 @@
-# Copyright 2003, 2004 Free Software Foundation, Inc.
+# Copyright 2003, 2004, 2005, 2006 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
@@ -206,7 +206,7 @@ gdb_expect_list "continue to printf" "$gdb_prompt$" {
send_gdb "backtrace\n"
gdb_expect_list "backtrace from shlibrary" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
- "#0 .* printf \[^\r\n\]*\r\n"
+ "#0 .* .*printf \[^\r\n\]*\r\n"
"#1 .* main \[^\r\n\]*\r\n"
}
@@ -246,7 +246,7 @@ if [target_info exists gdb,nosignals] {
gdb_expect_list "backtrace @ signal handler" "$gdb_prompt$" {
"#0 +handle_USR1 \[^\r\n\]+\r\n"
"#1 +.signal handler called.\r\n"
- "#2 .* printf \[^\r\n\]+\r\n"
+ "#2 .* .*printf \[^\r\n\]+\r\n"
"#3 .* main \[^\r\n\]+\r\n"
}
}
diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp
index 9069885..5aae5f1 100644
--- a/gdb/testsuite/gdb.base/sigstep.exp
+++ b/gdb/testsuite/gdb.base/sigstep.exp
@@ -1,4 +1,4 @@
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004, 2005, 2006 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
@@ -130,6 +130,9 @@ proc advancei { i } {
setup_kfail "sparc*-*-openbsd*" gdb/1736
fail "$test (could not insert single-step breakpoint)"
}
+ -re "Breakpoint \[0-9\]*, handler .*${gdb_prompt} $" {
+ fail "$test (hit breakpoint again)"
+ }
-re "done = 1;.*${gdb_prompt} $" {
send_gdb "$i\n"
exp_continue -continue_timer