2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
authorJeff Johnston <jjohnstn@redhat.com>
Fri, 8 Nov 2002 20:37:50 +0000 (20:37 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Fri, 8 Nov 2002 20:37:50 +0000 (20:37 +0000)
        * lib/mi-support.exp (mi_gdb_start): Verify the startup message
        for mi1 and current mi is in correct format.  New mi startup message
        should be in mi console format.  This is part of fix for PR gdb/604.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/mi-support.exp

index 6c8f77951d98696d5468219780c9629f8b97adc2..394e7dca1f97edfd2aeffb87cc6cdbd54fc1e7e7 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-08  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * lib/mi-support.exp (mi_gdb_start): Verify the startup message 
+       for mi1 and current mi is in correct format.  New mi startup message 
+       should be in mi console format.  This is part of fix for PR gdb/604.
+
 2002-09-18  Fernando Nasser  <fnasser@redhat.com>
 
        * gdb.asm/asm-source.exp: Adjust patter to new disassembler routine
index 0395afab890211c155e92d8f2616ef91c25ee590..de775b6c423087d5b761eaf5ecf357f1daac97c5 100644 (file)
@@ -123,7 +123,26 @@ proc mi_gdb_start { } {
        return 1;
     }
     gdb_expect {
-       -re ".*$mi_gdb_prompt$" {
+       -re "~\"GNU.*\r\n~\".*$mi_gdb_prompt$" {
+           # We have a new format mi startup prompt.  If we are
+           # running mi1, then this is an error as we should be
+           # using the old-style prompt.
+           if { $MIFLAGS == "-i=mi1" } {
+               perror "(mi startup) Got unexpected new mi prompt."
+               remote_close host;
+               return -1;
+           }
+           verbose "GDB initialized."
+       }
+       -re "\[^~\].*$mi_gdb_prompt$" {
+           # We have an old format mi startup prompt.  If we are
+           # not running mi1, then this is an error as we should be
+           # using the new-style prompt.
+           if { $MIFLAGS != "-i=mi1" } {
+               perror "(mi startup) Got unexpected old mi prompt."
+               remote_close host;
+               return -1;
+           }
            verbose "GDB initialized."
        }
        -re ".*$gdb_prompt $" {
This page took 0.031513 seconds and 4 git commands to generate.