From: Daniel Jacobowitz Date: Sun, 28 Oct 2001 17:59:48 +0000 (+0000) Subject: Merge from HEAD. X-Git-Tag: gdb_5_1-2001-11-21-release~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=daafd1526bc4ec3ab234de26dc119a84e3bb7734;p=thirdparty%2Fbinutils-gdb.git Merge from HEAD. 2001-10-27 Daniel Jacobowitz * gdb.mi/mi-hack-cli.exp: Remove excess newlines from test strings. * gdm.mi/mi0-hack-cli.exp: Likewise. 2001-10-01 Daniel Jacobowitz * gdb.threads/pthreads.exp: Wait for output and delay before sending ^C. 2001-10-01 Daniel Jacobowitz * gdb.mi/mi-var-display.exp (continue to incr_a): Recognize some incorrect output instead of timing out. * gdb.mi/mi-var-display.exp (continue to incr_a): Likewise. 2001-09-27 Daniel Jacobowitz * gdb.base/completion.exp: Remove incorrect 'p "a' test. Add tests for 'p "break' (pass) and 'p "break.' (xfail). --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ceb04b71dc2..4377203bc67 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,8 +1,29 @@ +2001-10-27 Daniel Jacobowitz + + * gdb.mi/mi-hack-cli.exp: Remove excess newlines from test strings. + * gdm.mi/mi0-hack-cli.exp: Likewise. + 2001-10-21 Andrew Cagney * lib/mi-support.exp (mi_gdb_start): Don't require MI_OUT when checking MI enabled. +2001-10-01 Daniel Jacobowitz + + * gdb.threads/pthreads.exp: Wait for output and delay + before sending ^C. + +2001-10-01 Daniel Jacobowitz + + * gdb.mi/mi-var-display.exp (continue to incr_a): Recognize + some incorrect output instead of timing out. + * gdb.mi/mi-var-display.exp (continue to incr_a): Likewise. + +2001-09-27 Daniel Jacobowitz + + * gdb.base/completion.exp: Remove incorrect 'p "a' test. + Add tests for 'p "break' (pass) and 'p "break.' (xfail). + 2001-07-25 Michael Snyder * gdb.base/consecutive.exp: New file. Test stepping over diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index f54a50a80c6..2234004f000 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -38,7 +38,9 @@ # "info ajksdlfk " no completions # "info" " " # "info " ambiguous (all info commands) -# "p \"a" no completions (string constant) +# "p \"break" unambiguous (completes to filename "break.c") +# "p \"break." unambiguous (should complete to "break.c" but does not, +# due to readline limitations) # "p 'a" ambiguous (all symbols starting with a) # "p b-a" ambiguous (all symbols starting with a) # "p b-" ambiguous (all symbols) @@ -349,20 +351,61 @@ gdb_expect { } -send_gdb "p \"a\t" +send_gdb "p \"break\t" sleep 1 gdb_expect { - -re "^p \"a\\\x07$"\ + -re "^p \"break\\\x07$"\ { send_gdb "\n" gdb_expect { - -re "Unterminated string in expression\\..*$gdb_prompt $"\ - { pass "complete 'p a'"} - -re ".*$gdb_prompt $" { fail "complete 'p a'"} - timeout {fail "(timeout) complete 'p a'"} + -re ".*$gdb_prompt $" { fail "complete 'p \"break'"} + timeout {fail "(timeout) complete 'p \"break'"} } } - -re ".*$gdb_prompt $" { fail "complete 'p \"a'" } - timeout { fail "(timeout) complete 'p \"a'" } + -re "^p \"break\\.c\"$"\ + { send_gdb "\n" + gdb_expect { + -re ".*$gdb_prompt $" { pass "complete 'p \"break'"} + timeout {fail "(timeout) complete 'p \"break'"} + } + } + -re "^p \"break.*$" + { send_gdb "\n" + gdb_expect { + -re ".*$gdb_prompt $" { fail "complete 'p \"break'"} + timeout {fail "(timeout) complete 'p \"break'"} + } + } + -re ".*$gdb_prompt $" { fail "complete 'p \"break'" } + timeout { fail "(timeout) complete 'p \"break'" } + } + +setup_xfail "*-*-*" +send_gdb "p \"break.\t" +sleep 1 +gdb_expect { + -re "^p \"break\\.\\\x07$"\ + { send_gdb "\n" + gdb_expect { + -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"} + timeout {fail "(timeout) complete 'p \"break.'"} + } + } + -re "^p \"break\\.c\"$"\ + { send_gdb "\n" + gdb_expect { + -re ".*$gdb_prompt $" { pass "complete 'p \"break.'"} + timeout {fail "(timeout) complete 'p \"break.'"} + } + } + -re "^p \"break\\..*$" + { send_gdb "\n" + gdb_expect { + -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"} + timeout {fail "(timeout) complete 'p \"break.'"} + } + } + -re ".*$gdb_prompt $" { fail "complete 'p \"break.'" } + timeout { fail "(timeout) complete 'p \"break.'" } } send_gdb "p 'a\t" diff --git a/gdb/testsuite/gdb.mi/mi-hack-cli.exp b/gdb/testsuite/gdb.mi/mi-hack-cli.exp index 54b789ffd3c..a0489431a2e 100644 --- a/gdb/testsuite/gdb.mi/mi-hack-cli.exp +++ b/gdb/testsuite/gdb.mi/mi-hack-cli.exp @@ -28,11 +28,11 @@ if [mi_gdb_start] { continue } -mi_gdb_test "show architecture\n" \ +mi_gdb_test "show architecture" \ "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \ "show architecture" -mi_gdb_test "47show architecture\n" \ +mi_gdb_test "47show architecture" \ "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \ "47show architecture" diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp index e84a1b7cca2..3ac42e8fdbb 100644 --- a/gdb/testsuite/gdb.mi/mi-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi-var-display.exp @@ -591,6 +591,12 @@ gdb_expect { -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" { pass "continue to incr_a" } + -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" { + fail "continue to incr_a (compiler debug info incorrect)" + } + -re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" { + fail "continue to incr_a (unknown output)" + } timeout { fail "continue to incr_a (timeout)" } diff --git a/gdb/testsuite/gdb.mi/mi0-hack-cli.exp b/gdb/testsuite/gdb.mi/mi0-hack-cli.exp index 50a1e19f8ea..3fc6c26c290 100644 --- a/gdb/testsuite/gdb.mi/mi0-hack-cli.exp +++ b/gdb/testsuite/gdb.mi/mi0-hack-cli.exp @@ -28,11 +28,11 @@ if [mi_gdb_start] { continue } -mi_gdb_test "show architecture\n" \ +mi_gdb_test "show architecture" \ "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \ "show architecture" -mi_gdb_test "47show architecture\n" \ +mi_gdb_test "47show architecture" \ "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \ "47show architecture" diff --git a/gdb/testsuite/gdb.mi/mi0-var-display.exp b/gdb/testsuite/gdb.mi/mi0-var-display.exp index e01f5341adc..561d573cd41 100644 --- a/gdb/testsuite/gdb.mi/mi0-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi0-var-display.exp @@ -591,6 +591,12 @@ gdb_expect { -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\"2\.*\"\}\},file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" { pass "continue to incr_a" } + -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" { + fail "continue to incr_a (compiler debug info incorrect)" + } + -re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" { + fail "continue to incr_a (unknown output)" + } timeout { fail "continue to incr_a (timeout)" } diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp index e57583b475c..0703395d78b 100644 --- a/gdb/testsuite/gdb.threads/pthreads.exp +++ b/gdb/testsuite/gdb.threads/pthreads.exp @@ -248,6 +248,15 @@ proc check_control_c {} { # Send a continue followed by ^C to the process to stop it. send_gdb "continue\n" + gdb_expect { + -re "Continuing." { + pass "Continue with all threads running" + } + timeout { + fail "Continue with all threads running (timeout)" + } + } + sleep 1 set description "Stopped with a ^C" after 1000 [send_gdb "\003"] gdb_expect {