-# Copyright 2010-2012 Free Software Foundation, Inc.
+# Copyright 2010-2013 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 [target_info exists gdb,nofileio] {
- verbose "Skipping tfile.exp because of no fileio capabilities."
- continue
-}
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-
gdb_exit
gdb_start
-set testfile "tfile"
-set srcfile ${testfile}.c
-set binfile $objdir/$subdir/$testfile
+standard_testfile
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable {debug nowarnings}] != "" } {
untested ${testfile}.exp
# Make sure we are starting fresh.
remote_file host delete basic.tf
remote_file host delete error.tf
+remote_file target delete basic.tf
+remote_file target delete error.tf
-gdb_load $binfile
+remote_exec target "$binfile"
+# Copy tracefile from target to host through build.
+remote_download host [remote_upload target basic.tf] basic.tf
+remote_download host [remote_upload target error.tf] error.tf
-runto_main
-
-gdb_test "break done_making_trace_files" ".*" ""
-
-gdb_test "continue" ".*" ""
-
-# tsave command would be tested here...
-
-gdb_test "continue" ".*" ""
+gdb_load $binfile
# Program has presumably exited, now target a trace file it created.