diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-11-08 20:37:50 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-11-08 20:37:50 +0000 |
commit | cc339ce610ba2ad69378f4672b7d4edc3b47c569 (patch) | |
tree | 6dd20433fe7727acfda47869e761f8f6ff6d5571 /gdb/testsuite | |
parent | ba5773c40e14732f263f8bf9f141c9ad293c3a0c (diff) | |
download | gdb-cc339ce610ba2ad69378f4672b7d4edc3b47c569.tar.gz |
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 21 |
2 files changed, 26 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6c8f77951d9..394e7dca1f9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -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 diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 0395afab890..de775b6c423 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -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 $" { |