aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/relocate.exp
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-27 23:44:51 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-27 23:44:51 +0000
commit02746bbc9f260f92b3abb96d862f4e75fd6f3fc0 (patch)
treeed11da9352953a731de7da35b050de94f2979877 /gdb/testsuite/gdb.base/relocate.exp
parent2245442480a7de9c1e2364416b928500ad87bcab (diff)
downloadgdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.zip
gdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.tar.gz
gdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.tar.bz2
2010-05-27 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdb.base/relational.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/relocate.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/restore.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/return.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/return2.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/sepdebug.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/setshow.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/setvar.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/shlib-call.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/shreloc.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/sigall.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/sigbpt.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/signull.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/so-impl-ld.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/varargs.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/volatile.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/watch_thread_num.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/watchpoint.exp: Replace uses of send_gdb / gdb_expect.
Diffstat (limited to 'gdb/testsuite/gdb.base/relocate.exp')
-rw-r--r--gdb/testsuite/gdb.base/relocate.exp39
1 files changed, 17 insertions, 22 deletions
diff --git a/gdb/testsuite/gdb.base/relocate.exp b/gdb/testsuite/gdb.base/relocate.exp
index 4c58ba8..8943c59 100644
--- a/gdb/testsuite/gdb.base/relocate.exp
+++ b/gdb/testsuite/gdb.base/relocate.exp
@@ -32,29 +32,24 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}]
}
proc get_var_address { var } {
- global gdb_prompt hex
-
- send_gdb "print &${var}\n"
- # Match output like:
- # $1 = (int *) 0x0
- # $5 = (int (*)()) 0
- # $6 = (int (*)()) 0x24 <function_bar>
- gdb_expect {
- -re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $"
- {
- pass "get address of ${var}"
- if { $expect_out(1,string) == "0" } {
- return "0x0"
- } else {
- return $expect_out(1,string)
- }
+ global gdb_prompt hex
+
+ # Match output like:
+ # $1 = (int *) 0x0
+ # $5 = (int (*)()) 0
+ # $6 = (int (*)()) 0x24 <function_bar>
+
+ gdb_test_multiple "print &${var}" "get address of ${var}" {
+ -re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $" {
+ pass "get address of ${var}"
+ if { $expect_out(1,string) == "0" } {
+ return "0x0"
+ } else {
+ return $expect_out(1,string)
+ }
}
- -re "${gdb_prompt} $"
- { fail "get address of ${var} (unknown output)" }
- timeout
- { fail "get address of ${var} (timeout)" }
- }
- return ""
+ }
+ return ""
}