aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2004-07-20 00:24:41 +0000
committerMichael Chastain <mec@google.com>2004-07-20 00:24:41 +0000
commitab618a02359034b62ee434b122e0a58c180b3767 (patch)
treede05844a63816dabacee01ba066d318764b8075f
parent3628158c3e00c458c7d07e87ff990f19cac34adc (diff)
downloadgdb-ab618a02359034b62ee434b122e0a58c180b3767.zip
gdb-ab618a02359034b62ee434b122e0a58c180b3767.tar.gz
gdb-ab618a02359034b62ee434b122e0a58c180b3767.tar.bz2
2004-07-19 Michael Chastain <mec.gnu@mindspring.com>
Fix PR cli/740. * gdb.base/annota1.exp: Honor gdb,nosignals. * gdb.base/annota3.exp: Likewise.
-rw-r--r--gdb/testsuite/ChangeLog13
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp76
-rw-r--r--gdb/testsuite/gdb.base/annota3.exp86
3 files changed, 104 insertions, 71 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ca0b9c2..1c6d625 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,18 @@
2004-07-19 Michael Chastain <mec.gnu@mindspring.com>
+ Fix PR cli/740.
+ * gdb.base/annota1.exp: Honor gdb,nosignals.
+ * gdb.base/annota3.exp: Likewise.
+
+2004-07-19 Michael Chastain <mec.gnu@mindspring.com>
+
+ * gdb.ada/gnat_ada.gpr.in: Rename from here ...
+ * gdb.ada/gnat_ada.gin: ... to here.
+ * configure.in: Use gnat_ada.gin.
+ * configure: Regenerate.
+
+2004-07-19 Michael Chastain <mec.gnu@mindspring.com>
+
* lib/java.exp: Update copyright notice.
2004-07-19 Andrew Cagney <cagney@gnu.org>
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index f09a396..a521aea 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -269,35 +269,40 @@ gdb_expect {
# annotate-arg-value
# annotate-arg-end
#
-send_gdb "signal SIGUSR1\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\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\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "send SIGUSR1" }
- -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\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\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { setup_xfail "*-*-*" 1270
- fail "send SIGUSR1" }
- -re ".*$gdb_prompt$" { fail "send SIGUSR1" }
- timeout { fail "send SIGUSR1 (timeout)" }
-}
+if [target_info exists gdb,nosignals] {
+ unsupported "send SIGUSR1"
+ unsupported "backtrace @ signal handler"
+} else {
+ send_gdb "signal SIGUSR1\n"
+ gdb_expect {
+ -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\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\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ { pass "send SIGUSR1" }
+ -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\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\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ { setup_xfail "*-*-*" 1270
+ fail "send SIGUSR1" }
+ -re ".*$gdb_prompt$" { fail "send SIGUSR1" }
+ timeout { fail "send SIGUSR1 (timeout)" }
+ }
-#
-# test:
-# annotate-signal-handler-caller
-#
-verbose "match_max local is: [match_max]"
-verbose "match_max default is: [match_max -d]"
-# This is necessary because a 2000 buffer is not enought to get everything
-# up to the prompt ad the test gets a timeout.
-match_max 3000
-verbose "match_max now is: [match_max]"
-send_gdb "backtrace\n"
-gdb_expect {
- -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
- pass "backtrace @ signal handler"
+ #
+ # test:
+ # annotate-signal-handler-caller
+ #
+ verbose "match_max local is: [match_max]"
+ verbose "match_max default is: [match_max -d]"
+ # This is necessary because a 2000 buffer is not enought to get everything
+ # up to the prompt ad the test gets a timeout.
+ match_max 3000
+ verbose "match_max now is: [match_max]"
+ send_gdb "backtrace\n"
+ gdb_expect {
+ -re "frame-begin 0 $hex\r\n#0.*frame-end.*frame-begin 1 $hex\r\n#1.*(\032\032signal-handler-caller\r\n.signal handler called.\r\n\r\n)+\032\032frame-end\r\n\r\n\032\032frame-begin 2 $hex\r\n#2.*(frame-begin 3 $hex\r\n#3.*)*frame-end.*$gdb_prompt$" {
+ pass "backtrace @ signal handler"
+ }
+ -re ".*$gdb_prompt$" { fail "backtrace @ signal handler" }
+ timeout { fail "backtrace @ signal handler (timeout)" }
}
- -re ".*$gdb_prompt$" { fail "backtrace @ signal handler" }
- timeout { fail "backtrace @ signal handler (timeout)" }
}
#
@@ -446,13 +451,18 @@ gdb_expect {
# It has been verified that other signals will be delivered. However,
# rather than twiddle the test, I choose to leave it as-is as it
# exposes an interesting failure on hpux11.
-setup_xfail hppa*-*-hpux11*
-send_gdb "signal SIGTRAP\n"
-gdb_expect {
- -re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "signal sent" }
- -re ".*$gdb_prompt$" { fail "signal sent" }
- timeout { fail "signal sent (timeout)" }
+
+if [target_info exists gdb,nosignals] {
+ unsupported "signal sent"
+} else {
+ setup_xfail hppa*-*-hpux11*
+ send_gdb "signal SIGTRAP\n"
+ gdb_expect {
+ -re ".*\032\032post-prompt\r\nContinuing with signal SIGTRAP.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032signalled\r\n\r\nProgram terminated with signal \r\n\032\032signal-name\r\nSIGTRAP\r\n\032\032signal-name-end\r\n, \r\n\032\032signal-string\r\nTrace.breakpoint trap\r\n\032\032signal-string-end\r\n.\r\nThe program no longer exists.\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ { pass "signal sent" }
+ -re ".*$gdb_prompt$" { fail "signal sent" }
+ timeout { fail "signal sent (timeout)" }
+ }
}
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
index dcc86c3..ccc16e2 100644
--- a/gdb/testsuite/gdb.base/annota3.exp
+++ b/gdb/testsuite/gdb.base/annota3.exp
@@ -217,34 +217,39 @@ gdb_expect_list "backtrace from shlibrary" "$gdb_prompt$" {
#
# test printing a frame with some arguments:
#
-send_gdb "signal SIGUSR1\n"
-gdb_expect_list "send SIGUSR1" "$gdb_prompt$" {
- "\r\n\032\032post-prompt\r\n"
- "Continuing with signal SIGUSR1.\r\n"
- "\r\n\032\032starting\r\n"
- "\r\n\032\032frames-invalid\r\n"
- "\r\n\032\032breakpoint 2\r\n"
- "Breakpoint 2, handle_USR1 \\(sig=\[0-9\]+\\) at .*annota3.c:\[0-9\]+\r\n"
- "\r\n\032\032source .*annota3.c:\[0-9\]+:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"
- "\r\n\032\032stopped\r\n"
-}
+if [target_info exists gdb,nosignals] {
+ unsupported "send SIGUSR1"
+ unsupported "backtrace @ signal handler"
+} else {
+ send_gdb "signal SIGUSR1\n"
+ gdb_expect_list "send SIGUSR1" "$gdb_prompt$" {
+ "\r\n\032\032post-prompt\r\n"
+ "Continuing with signal SIGUSR1.\r\n"
+ "\r\n\032\032starting\r\n"
+ "\r\n\032\032frames-invalid\r\n"
+ "\r\n\032\032breakpoint 2\r\n"
+ "Breakpoint 2, handle_USR1 \\(sig=\[0-9\]+\\) at .*annota3.c:\[0-9\]+\r\n"
+ "\r\n\032\032source .*annota3.c:\[0-9\]+:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"
+ "\r\n\032\032stopped\r\n"
+ }
-#
-# test:
-#
-verbose "match_max local is: [match_max]"
-verbose "match_max default is: [match_max -d]"
-# This is necessary because a 2000 buffer is not enought to get everything
-# up to the prompt ad the test gets a timeout.
-match_max 3000
-verbose "match_max now is: [match_max]"
-send_gdb "backtrace\n"
-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"
- "#3 .* main \[^\r\n\]+\r\n"
+ #
+ # test:
+ #
+ verbose "match_max local is: [match_max]"
+ verbose "match_max default is: [match_max -d]"
+ # This is necessary because a 2000 buffer is not enought to get everything
+ # up to the prompt ad the test gets a timeout.
+ match_max 3000
+ verbose "match_max now is: [match_max]"
+ send_gdb "backtrace\n"
+ 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"
+ "#3 .* main \[^\r\n\]+\r\n"
+ }
}
#
@@ -369,18 +374,23 @@ gdb_expect_list "breakpoint ignore count" "$gdb_prompt$" {
# It has been verified that other signals will be delivered. However,
# rather than twiddle the test, I choose to leave it as-is as it
# exposes an interesting failure on hpux11.
-setup_xfail hppa*-*-hpux11*
-send_gdb "signal SIGTRAP\n"
-gdb_expect_list "signal sent" "$gdb_prompt$" {
- "\r\n\032\032post-prompt\r\n"
- "Continuing with signal SIGTRAP.\r\n"
- "\r\n\032\032starting\r\n"
- "\r\n\032\032frames-invalid\r\n"
- "\r\n\032\032frames-invalid\r\n"
- "\r\n\032\032signalled\r\n"
- "\r\nProgram terminated with signal SIGTRAP, Trace.breakpoint trap.\r\n"
- "The program no longer exists.\r\n"
- "\r\n\032\032stopped\r\n"
+
+if [target_info exists gdb,nosignals] {
+ unsupported "signal sent"
+} else {
+ setup_xfail hppa*-*-hpux11*
+ send_gdb "signal SIGTRAP\n"
+ gdb_expect_list "signal sent" "$gdb_prompt$" {
+ "\r\n\032\032post-prompt\r\n"
+ "Continuing with signal SIGTRAP.\r\n"
+ "\r\n\032\032starting\r\n"
+ "\r\n\032\032frames-invalid\r\n"
+ "\r\n\032\032frames-invalid\r\n"
+ "\r\n\032\032signalled\r\n"
+ "\r\nProgram terminated with signal SIGTRAP, Trace.breakpoint trap.\r\n"
+ "The program no longer exists.\r\n"
+ "\r\n\032\032stopped\r\n"
+ }
}