diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/annota3.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/annota3.exp | 86 |
1 files changed, 48 insertions, 38 deletions
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" + } } |