Move strace -m/explicit location test to strace.exp
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / while-dyn.exp
index 4d1ae596fcdf6bbe3028bfccb1a21753bbf7b65c..fe4535ec0ef5e88ffa8fe798cd0fa5e45332d14c 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1998, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#   Copyright 1998-2015 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 load_lib "trace-support.exp"
 
-if $tracelevel then {
-    strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
 
 gdb_exit
 gdb_start
 
-set testfile "actions"
-set srcfile $testfile.c
-set executable while-dyn
-set binfile $objdir/$subdir/$executable
+standard_testfile actions.c
+set executable $testfile
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested while-dyn.exp
     return -1
 }
 gdb_load $binfile
-gdb_test "tstop"       "" ""
-gdb_test "tfind none"  "" ""
+gdb_test "tstop"       ".*" ""
+gdb_test "tfind none"  ".*" ""
 runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
-# We generously give ourselves one "pass" if we successfully 
-# detect that this test cannot be run on this target!
 if { ![gdb_target_supports_trace] } then {
-    pass "Current target does not support trace"
-    return 1;
+    unsupported "Current target does not support trace"
+    return 1
 }
 
 #
 # test while-stepping dynamically (live target)
 #
 
-if [istarget "x86_64-*"] then {
+if [is_amd64_regs_target] {
     set fpreg "\$rbp"
-} elseif [istarget "i?86-*"] then {
+} elseif [is_x86_like_target] {
     set fpreg "\$ebp"
+} elseif [is_aarch64_target] {
+    set fpreg "\$x29"
 } else {
     set fpreg "\$fp"
 }
@@ -69,8 +61,8 @@ proc test_while_stepping { while_stepping } {
 
     clean_restart $executable
 
-    gdb_test "tstop" "" ""
-    gdb_test "tfind none" "" ""
+    gdb_test "tstop" ".*" ""
+    gdb_test "tfind none" ".*" ""
     runto_main
 
     ## verify number of trace frames collected matches stepcount
@@ -88,14 +80,14 @@ proc test_while_stepping { while_stepping } {
        "end" "^$" \
        "end" ""
 
-    gdb_test "tstart" "" ""
+    gdb_test "tstart" ".*" ""
 
-    gdb_test "break end" "" ""
+    gdb_test "break end" ".*" ""
     gdb_test "continue" \
        "Continuing.*Breakpoint $decimal, end.*" \
        "$while_stepping: run trace experiment"
 
-    gdb_test "tstop" "" ""
+    gdb_test "tstop" ".*" ""
 
     gdb_tfind_test "$while_stepping: frame 5 should be the last one collected" "5" "5"
 
@@ -109,7 +101,7 @@ proc test_while_stepping { while_stepping } {
        }
     }
 
-    gdb_test "tfind none" "" ""
+    gdb_test "tfind none" ".*" ""
 }
 
 # Test all while-stepping aliases.
This page took 0.026338 seconds and 4 git commands to generate.