Merge from HEAD.
authorDaniel Jacobowitz <drow@false.org>
Sun, 28 Oct 2001 17:59:48 +0000 (17:59 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 28 Oct 2001 17:59:48 +0000 (17:59 +0000)
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-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).

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.mi/mi-hack-cli.exp
gdb/testsuite/gdb.mi/mi-var-display.exp
gdb/testsuite/gdb.mi/mi0-hack-cli.exp
gdb/testsuite/gdb.mi/mi0-var-display.exp
gdb/testsuite/gdb.threads/pthreads.exp

index ceb04b7..4377203 100644 (file)
@@ -1,8 +1,29 @@
+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
index f54a50a..2234004 100644 (file)
@@ -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"
index 54b789f..a048943 100644 (file)
@@ -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"
 
index e84a1b7..3ac42e8 100644 (file)
@@ -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)"
     }
index 50a1e19..3fc6c26 100644 (file)
@@ -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"
 
index e01f534..561d573 100644 (file)
@@ -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)"
     }
index e57583b..0703395 100644 (file)
@@ -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 {