+2001-10-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.mi/mi-hack-cli.exp: Remove excess newlines from test strings.
+ * gdm.mi/mi0-hack-cli.exp: Likewise.
+
2001-10-21 Andrew Cagney <ac131313@redhat.com>
* lib/mi-support.exp (mi_gdb_start): Don't require MI_OUT when
checking MI enabled.
+2001-10-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/pthreads.exp: Wait for output and delay
+ before sending ^C.
+
+2001-10-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * 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 <drow@mvista.com>
+
+ * gdb.base/completion.exp: Remove incorrect 'p "a' test.
+ Add tests for 'p "break' (pass) and 'p "break.' (xfail).
+
2001-07-25 Michael Snyder <msnyder@redhat.com>
* gdb.base/consecutive.exp: New file. Test stepping over
# "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)
}
-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"
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"
-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)"
}
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"
-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)"
}
# 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 {