From: Andrew Cagney Date: Thu, 3 Apr 2003 16:34:48 +0000 (+0000) Subject: 2003-04-02 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed4c619a6772b5ca8fd509f27d3cb6d9623a7616;p=binutils-gdb.git 2003-04-02 Andrew Cagney * gdb.base/callfuncs.exp: Make "print add" messages unique. * gdb.base/ending-run.exp: Put spaces around "breakpoint" to stop matching directories by the name breakpoint. * gdb.base/pointers.exp: Make "ptype pppC" message consistent. Make "continue to marker1" consistent. * gdb.base/call-rt-st.exp: Make "finish out from loop_count" message consistent. * lib/gdb.exp: Put "the program is no longer running", and "the program exited" in parenthesis. * lib/mi-support.exp: Ditto. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 73aa52d86ee..0cadc56900d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2003-04-02 Andrew Cagney + + * gdb.base/callfuncs.exp: Make "print add" messages unique. + * gdb.base/ending-run.exp: Put spaces around "breakpoint" to stop + matching directories by the name breakpoint. + * gdb.base/pointers.exp: Make "ptype pppC" message consistent. + Make "continue to marker1" consistent. + * gdb.base/call-rt-st.exp: Make "finish out from loop_count" + message consistent. + * lib/gdb.exp: Put "the program is no longer running", and "the + program exited" in parenthesis. + * lib/mi-support.exp: Ditto. + 2003-04-02 Bob Rossi * gdb.mi/mi-file.exp: New file for -file-list-exec-source-file. diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp index 115dcb3fa7e..0acd1393a7a 100644 --- a/gdb/testsuite/gdb.base/call-rt-st.exp +++ b/gdb/testsuite/gdb.base/call-rt-st.exp @@ -128,12 +128,18 @@ gdb_expect { send_gdb "finish\n" gdb_expect { - -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:617\[ \t\r\n\]+617\[\t \]+return 0;.*$gdb_prompt $" { - pass "finish out from loop_count (line 617)"} - -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:615\[ \t\r\n\]+615\[\t \]+loop_count.*$gdb_prompt $" { - pass "finish out from loop_count (line 615)"} - -re ".*$gdb_prompt $" { fail "finish out from loop_count"} - timeout { fail "(timeout)finish out from loop_count"} + -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:617\[ \t\r\n\]+617\[\t \]+return 0;.*$gdb_prompt $" { + pass "finish out from loop_count (line 617)" + } + -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:615\[ \t\r\n\]+615\[\t \]+loop_count.*$gdb_prompt $" { + pass "finish out from loop_count (line 615)" + } + -re ".*$gdb_prompt $" { + fail "finish out from loop_count" + } + timeout { + fail "finish out from loop_count (timeout)" + } } # Ask GDB to print the value of EXPR, and expect to see the regexp diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 9183fe46b82..7a5f14302d7 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -342,7 +342,8 @@ if ![gdb_test "bt 2" \ # Call function (causing a breakpoint hit in the call dummy) and do a finish, # make sure we are back at main and still have the same register contents. -gdb_test "print add(4,5)" "The program being debugged stopped while.*" "" +gdb_test "print add(4,5)" "The program being debugged stopped while.*" \ + "call function causing a breakpoint then do a finish" gdb_test "finish" \ "Value returned is .* = 9" \ "finish from call dummy breakpoint returns correct value" @@ -360,7 +361,8 @@ if ![gdb_test "bt 2" \ # Call function (causing a breakpoint hit in the call dummy) and do a return # with a value, make sure we are back at main with the same register contents. -gdb_test "print add(4,5)" "The program being debugged stopped while.*" "" +gdb_test "print add(4,5)" "The program being debugged stopped while.*" \ + "call function causing a breakpoint and then do a return" if ![gdb_test "return 7" \ "#0 main.*" \ "back at main after return from call dummy breakpoint" \ diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index f89e142dd92..3960f0621d7 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -74,7 +74,7 @@ if [target_info exists use_gdb_stub] { gdb_test "cle" ".*Deleted breakpoints 2 1.*" "clear worked" send_gdb "i b\n" gdb_expect { - -re ".*breakpoint.*breakpoint.*$gdb_prompt $" { + -re ".* breakpoint .* breakpoint .*$gdb_prompt $" { fail "cleared bp at line before routine" } -re ".*3.*main.*31.*$gdb_prompt $" { @@ -120,7 +120,7 @@ gdb_expect { send_gdb "i b\n" gdb_expect { - -re ".*breakpoint.*breakpoint.*$gdb_prompt $" { + -re ".* breakpoint .* breakpoint .*$gdb_prompt $" { fail "all set to continue (didn't clear bps)" } -re ".*3.*main.*31.*$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.base/pointers.exp b/gdb/testsuite/gdb.base/pointers.exp index 5f406ad1533..a10a7f3b4cc 100644 --- a/gdb/testsuite/gdb.base/pointers.exp +++ b/gdb/testsuite/gdb.base/pointers.exp @@ -366,23 +366,28 @@ gdb_expect { send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $" - send_gdb "cont\n" - gdb_expect { - -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" { - send_gdb "up\n" - gdb_expect { - -re ".*more_code.*$gdb_prompt $" { - pass "up from marker1" - } - -re ".*$gdb_prompt $" { - fail "up from marker1" - } - timeout { fail "up from marker1 (timeout)" } - } - } - -re "$gdb_prompt $" { fail "continue to marker1" } - timeout { fail "(timeout) continue to marker1" } +send_gdb "cont\n" +gdb_expect { + -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" { + pass "continue to marker1" + send_gdb "up\n" + gdb_expect { + -re ".*more_code.*$gdb_prompt $" { + pass "up from marker1" + } + -re ".*$gdb_prompt $" { + fail "up from marker1" + } + timeout { fail "up from marker1 (timeout)" } + } + } + -re "$gdb_prompt $" { + fail "continue to marker1" } + timeout { + fail "continue to marker1 (timeout)" + } +} send_gdb "print *pUC\n" @@ -568,7 +573,7 @@ gdb_expect { send_gdb "ptype pppC\n" gdb_expect { - -re "type = char \\*\\*\\*.*$gdb_prompt $" { pass "ptype pppC" } + -re "type = char \\*\\*\\*.*$gdb_prompt $" { pass "ptype pppC" } -re ".*$gdb_prompt $" { fail "ptype pppC" } timeout { fail "(timeout) ptype pppC" } } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index d2b6fbdb8c6..4dfbf76c950 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -541,27 +541,27 @@ proc gdb_test_multiple { command message user_code } { } -re "Program exited with code \[0-9\]+.*$gdb_prompt $" { if ![string match "" $message] then { - set errmsg "$message: the program exited" + set errmsg "$message (the program exited)" } else { - set errmsg "$command: the program exited" + set errmsg "$command (the program exited)" } fail "$errmsg" set result -1 } -re "EXIT code \[0-9\r\n\]+Program exited normally.*$gdb_prompt $" { if ![string match "" $message] then { - set errmsg "$message: the program exited" + set errmsg "$message (the program exited)" } else { - set errmsg "$command: the program exited" + set errmsg "$command (the program exited)" } fail "$errmsg" set result -1 } -re "The program is not being run.*$gdb_prompt $" { if ![string match "" $message] then { - set errmsg "$message: the program is no longer running" + set errmsg "$message (the program is no longer running)" } else { - set errmsg "$command: the program is no longer running" + set errmsg "$command (the program is no longer running)" } fail "$errmsg" set result -1 diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 4b057d49623..59076280ce8 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -549,18 +549,18 @@ proc mi_gdb_test { args } { } -re "Program exited with code \[0-9\]+.*$mi_gdb_prompt\[ \]*$" { if ![string match "" $message] then { - set errmsg "$message: the program exited" + set errmsg "$message (the program exited)" } else { - set errmsg "$command: the program exited" + set errmsg "$command (the program exited)" } fail "$errmsg" return -1 } -re "The program is not being run.*$mi_gdb_prompt\[ \]*$" { if ![string match "" $message] then { - set errmsg "$message: the program is no longer running" + set errmsg "$message (the program is no longer running)" } else { - set errmsg "$command: the program is no longer running" + set errmsg "$command (the program is no longer running)" } fail "$errmsg" return -1