[committed]: [PATCH] Tweaks in gdb.trace/tfile.exp

Yao Qi yao@codesourcery.com
Thu Aug 23 14:05:00 GMT 2012


On 08/23/2012 06:55 PM, Pedro Alves wrote:
> Makes sense now, thanks.  Sorry for the mixup.
>

Never mind.  Thanks for the review, Pedro.

> This is okay with the other nits fixed.

Below is what I committed.  Note that the changes to tfile.c is moved
out of this patch.

-- 
Yao

gdb/testsuite:

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.
---
  gdb/testsuite/boards/native-gdbserver.exp       |    4 ++++
  gdb/testsuite/boards/native-stdio-gdbserver.exp |    4 ++++
  gdb/testsuite/gdb.trace/tfile.exp               |   23 
+++++++----------------
  3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/gdb/testsuite/boards/native-gdbserver.exp 
b/gdb/testsuite/boards/native-gdbserver.exp
index 89702df..7172274 100644
--- a/gdb/testsuite/boards/native-gdbserver.exp
+++ b/gdb/testsuite/boards/native-gdbserver.exp
@@ -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
diff --git a/gdb/testsuite/boards/native-stdio-gdbserver.exp 
b/gdb/testsuite/boards/native-stdio-gdbserver.exp
index 9804289..d8c5376 100644
--- a/gdb/testsuite/boards/native-stdio-gdbserver.exp
+++ b/gdb/testsuite/boards/native-stdio-gdbserver.exp
@@ -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
diff --git a/gdb/testsuite/gdb.trace/tfile.exp 
b/gdb/testsuite/gdb.trace/tfile.exp
index a2c5c1d..33b1b6e 100644
--- a/gdb/testsuite/gdb.trace/tfile.exp
+++ b/gdb/testsuite/gdb.trace/tfile.exp
@@ -22,12 +22,6 @@

  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.

-- 
1.7.7.6



More information about the Gdb-patches mailing list