gdb/testsuite/
authorYao Qi <yao@codesourcery.com>
Thu, 23 Aug 2012 14:01:42 +0000 (14:01 +0000)
committerYao Qi <yao@codesourcery.com>
Thu, 23 Aug 2012 14:01:42 +0000 (14:01 +0000)
* boards/native-gdbserver.exp (${board}_upload): New.
* boards/native-stdio-gdbserver.exp (${board}_upload): New.
* gdb.trace/tfile.exp: Don't check 'gdb,nofileio'.
Execute tfile on remote target.
Copy trace file from target to host.

gdb/testsuite/ChangeLog
gdb/testsuite/boards/native-gdbserver.exp
gdb/testsuite/boards/native-stdio-gdbserver.exp
gdb/testsuite/gdb.trace/tfile.exp

index 6360f98..5382083 100644 (file)
@@ -1,3 +1,11 @@
+2012-08-23  Yao Qi  <yao@codesourcery.com>
+
+       * boards/native-gdbserver.exp (${board}_upload): New.
+       * boards/native-stdio-gdbserver.exp (${board}_upload): New.
+       * gdb.trace/tfile.exp: Don't check 'gdb,nofileio'.
+       Execute tfile on remote target.
+       Copy trace file from target to host.
+
 2012-08-22  Joseph Myers  <joseph@codesourcery.com>
 
        * gdb.arch/thumb-bx-pc.S: New file.
index 89702df..7172274 100644 (file)
@@ -80,6 +80,10 @@ proc ${board}_download { board host dest } {
     return $host
 }
 
+proc ${board}_upload {dest srcfile args} {
+    return $srcfile
+}
+
 proc ${board}_file { dest op args } {
     if { $op == "delete" } {
        return 0
index 9804289..d8c5376 100644 (file)
@@ -142,6 +142,10 @@ proc ${board}_download { board host dest } {
     return $host
 }
 
+proc ${board}_upload {dest srcfile args} {
+    return $srcfile
+}
+
 proc ${board}_file { dest op args } {
     if { $op == "delete" } {
        return 0
index a2c5c1d..33b1b6e 100644 (file)
 
 load_lib "trace-support.exp";
 
-if [target_info exists gdb,nofileio] {
-    verbose "Skipping tfile.exp because of no fileio capabilities."
-    continue
-}
-
-
 gdb_exit
 gdb_start
 standard_testfile
@@ -41,18 +35,15 @@ gdb_reinitialize_dir $srcdir/$subdir
 # 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
-
-runto_main
+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
 
-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.