Fix problem that alias can be defined or not depending on the order.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / mi-traceframe-changed.exp
index 4bcf3799bb7e3d86741d1cc1ed146f6ab65d13f5..f0be9a8b4f4fe361d4d9c8d4fbac2d7d21b5f4c6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2012-2014 Free Software Foundation, Inc.
+# Copyright 2012-2020 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
@@ -32,10 +32,10 @@ if {![is_remote host] && ![is_remote target]} {
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
           executable \
-          [list debug nowarnings \
+          [list debug nowarnings nopie\
                "additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \
          != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -43,14 +43,6 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 remote_file host delete $tfile_basic
 remote_file target delete $tfile_basic
 
-remote_exec target "$binfile"
-
-if {!$purely_local} {
-    # Copy tracefile from target to host.
-    remote_download host [remote_upload target tfile-basic.tf] \
-       tfile-basic.tf
-}
-
 proc test_tfind_tfile { } {
     with_test_prefix "tfile" {
        global binfile
@@ -88,7 +80,17 @@ proc test_tfind_tfile { } {
     }
 }
 
-test_tfind_tfile
+# If tracefile is generated successfully, copy tracefile to host and
+# run tests.
+if [generate_tracefile $binfile] {
+    if {!$purely_local} {
+       # Copy tracefile from target to host.
+       remote_download host [remote_upload target tfile-basic.tf] \
+           tfile-basic.tf
+    }
+
+    test_tfind_tfile
+}
 
 # Change to a different test case in order to run it on target, and get
 # several traceframes.
@@ -99,7 +101,7 @@ set executable $testfile
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
           executable {debug nowarnings}] != "" } {
-     untested ${testfile}.exp
+     untested "failed to compile"
      return -1
 }
 
@@ -108,12 +110,12 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 clean_restart $executable
 
 if ![runto_main] {
-    fail "Can't run to main to check for trace support"
+    fail "can't run to main to check for trace support"
     return -1
 }
 
 if ![gdb_target_supports_trace] {
-    unsupported "Current target does not support trace"
+    unsupported "current target does not support trace"
     return -1
 }
 
This page took 0.026992 seconds and 4 git commands to generate.