aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorLuis Machado <lgustavo@codesourcery.com>2013-11-15 19:41:07 -0200
committerLuis Machado <lgustavo@codesourcery.com>2013-11-15 19:41:07 -0200
commit6ec41e1e1d6dba58a520f75b8ae59285119b225f (patch)
treeb46f22625d59b3173d260a5536870076f7c6e3d4 /gdb/testsuite/lib
parent6ea71545c3a28206cd3eea1bb9e7155ee8952952 (diff)
downloadgdb-6ec41e1e1d6dba58a520f75b8ae59285119b225f.zip
gdb-6ec41e1e1d6dba58a520f75b8ae59285119b225f.tar.gz
gdb-6ec41e1e1d6dba58a520f75b8ae59285119b225f.tar.bz2
* lib/mi-support.exp (mi_gdb_test): Expect different formats
of inferior output for remote and native sessions. * gdb.mi/mi-console.exp: Remove obsolete comment. Check for semihosted inferior output pattern. (semihosted_string): New function.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/mi-support.exp31
1 files changed, 23 insertions, 8 deletions
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 3d55609..881e16e 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -765,20 +765,35 @@ proc mi_gdb_test { args } {
if { $result == 0 } {
if [ info exists ipattern ] {
if { ![target_info exists gdb,noinferiorio] } {
- global mi_inferior_spawn_id
- expect {
- -i $mi_inferior_spawn_id -re "$ipattern" {
- pass "$message inferior output"
+ if { [target_info gdb_protocol] == "remote"
+ || [target_info gdb_protocol] == "extended-remote"
+ || [target_info protocol] == "sim"} {
+
+ gdb_expect {
+ -re "$ipattern" {
+ pass "$message inferior output"
+ }
+ timeout {
+ fail "$message inferior output (timeout)"
+ set result 1
+ }
}
- timeout {
- fail "$message inferior output (timeout)"
- set result 1
+ } else {
+ global mi_inferior_spawn_id
+ expect {
+ -i $mi_inferior_spawn_id -re "$ipattern" {
+ pass "$message inferior output"
+ }
+ timeout {
+ fail "$message inferior output (timeout)"
+ set result 1
+ }
}
}
} else {
unsupported "$message inferior output"
}
- }
+ }
}
return $result