diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-12-16 20:03:17 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-12-16 20:03:17 +0000 |
commit | da81390ba627de5fee7615d00f2116253c65a5a4 (patch) | |
tree | b7f1e24a2e9f15d0b091fc0e1dabb0c9db4ccaa0 /gdb | |
parent | c029e1474f293df3f3ca99c6ad7180ee7e1ca2a2 (diff) | |
download | gdb-da81390ba627de5fee7615d00f2116253c65a5a4.zip gdb-da81390ba627de5fee7615d00f2116253c65a5a4.tar.gz gdb-da81390ba627de5fee7615d00f2116253c65a5a4.tar.bz2 |
2002-12-16 Jeff Johnston <jjohnstn@redhat.com>
* lib/mi-support.exp (mi_reinitialize_dir): Check mi level
to see whether we are using the new -environment-directory
command which resets via -r or the old version of the command
which may prompt the user. Part of fix for gdb/741.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 16 |
2 files changed, 20 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2b918a5..1691607 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2002-12-16 Jeff Johnston <jjohnstn@redhat.com> + + * lib/mi-support.exp (mi_reinitialize_dir): Check mi level + to see whether we are using the new -environment-directory + command which resets via -r or the old version of the command + which may prompt the user. Part of fix for gdb/741. + 2002-12-13 Andrew Cagney <ac131313@redhat.com> * gdb.fortran/types.exp: Update obsolete comment. diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 4d5bc6c..399aac6 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -234,6 +234,7 @@ proc mi_delete_breakpoints {} { proc mi_gdb_reinitialize_dir { subdir } { global mi_gdb_prompt + global MIFLAGS global suppress_flag if { $suppress_flag } { @@ -244,8 +245,9 @@ proc mi_gdb_reinitialize_dir { subdir } { return ""; } - send_gdb "104-environment-directory\n" - gdb_expect 60 { + if { $MIFLAGS == "-i=mi1" } { + send_gdb "104-environment-directory\n" + gdb_expect 60 { -re ".*Reinitialize source path to empty.*y or n. " { warning "Got confirmation prompt for dir reinitialization." send_gdb "y\n" @@ -256,6 +258,14 @@ proc mi_gdb_reinitialize_dir { subdir } { } -re "$mi_gdb_prompt$" {} timeout {error "Dir reinitialization failed (timeout)"} + } + } else { + send_gdb "104-environment-directory -r\n" + gdb_expect 60 { + -re "104\\\^done,source-path=.*\r\n$mi_gdb_prompt$" {} + -re "$mi_gdb_prompt$" {} + timeout {error "Dir reinitialization failed (timeout)"} + } } send_gdb "105-environment-directory $subdir\n" @@ -263,7 +273,7 @@ proc mi_gdb_reinitialize_dir { subdir } { -re "Source directories searched.*$mi_gdb_prompt$" { verbose "Dir set to $subdir" } - -re "105\\\^done\r\n$mi_gdb_prompt$" { + -re "105\\\^done.*\r\n$mi_gdb_prompt$" { # FIXME: We return just the prompt for now. verbose "Dir set to $subdir" # perror "Dir \"$subdir\" failed." |