2010-05-25 Michael Snyder <msnyder@vmware.com>
[binutils-gdb.git] / gdb / testsuite / gdb.ada / formatted_ref.exp
index 0fe5c8dd7c7b478e1e40e49597b666ddb95da8b7..ea118f689acf8541454dd1019784dec358bcee8b 100644 (file)
@@ -46,16 +46,13 @@ proc get_address { var } {
     global expect_out
     global gdb_prompt
 
-    send_gdb "print $var'access\n"
-    gdb_expect {
+    gdb_test_multiple "print $var'access" "address of $var" {
        -re "\\$\[0-9\]+ = \\(.*\\) (0x\[0-9a-f\]+).*$gdb_prompt $" {
             return $expect_out(1,string)
-       }
-        timeout { 
-           perror "couldn't find address of $var"
-           return ""
         }
     }
+    perror "couldn't find address of $var"
+    return ""
 }
 
 proc test_p_x { var val addr } {