This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [testsuite] Fix in board_file native-gdbserver.exp
On Thursday, June 21, 2012 03:01:45 PM Pedro Alves wrote:
> I think native-stdio-gdbserver.exp does have the same problem, though?
>
Yes, I can reproduce the same problem on board file native-stdio-
gdbserver.exp. I copy the same stuff into native-stdio-gdbserver.exp, and run
testsuite against it, no change on test result.
> > gdb/testsuite:
> >
> >
> > 2012-06-21 Yao Qi <yao@codesourcery.com>
> >
> >
> >
> > * boards/native-gdbserver.exp: New proc ${board}_exec.
>
> Okay, thanks.
Here is what I committed.
--
Yao (éå)
gdb/testsuite:
2012-06-22 Yao Qi <yao@codesourcery.com>
* boards/native-gdbserver.exp: New proc ${board}_exec.
* boards/native-stdio-gdbserver.exp: Likewise.
---
gdb/testsuite/boards/native-gdbserver.exp | 12 ++++++++++++
gdb/testsuite/boards/native-stdio-gdbserver.exp | 12 ++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/boards/native-gdbserver.exp
b/gdb/testsuite/boards/native-gdbserver.exp
index 5fa02a4..89702df 100644
--- a/gdb/testsuite/boards/native-gdbserver.exp
+++ b/gdb/testsuite/boards/native-gdbserver.exp
@@ -64,6 +64,18 @@ proc ${board}_spawn { board cmd } {
return $result
}
+proc ${board}_exec { hostname program args } {
+ global board_info
+
+ set baseboard [lindex [split $hostname "/"] 0]
+
+ set board_info($baseboard,isremote) 0
+ set result [remote_exec $hostname $program $args]
+ set board_info($baseboard,isremote) 1
+
+ return $result
+}
+
proc ${board}_download { board host dest } {
return $host
}
diff --git a/gdb/testsuite/boards/native-stdio-gdbserver.exp
b/gdb/testsuite/boards/native-stdio-gdbserver.exp
index 703f370..9804289 100644
--- a/gdb/testsuite/boards/native-stdio-gdbserver.exp
+++ b/gdb/testsuite/boards/native-stdio-gdbserver.exp
@@ -126,6 +126,18 @@ proc ${board}_spawn { board cmd } {
return $result
}
+proc ${board}_exec { hostname program args } {
+ global board_info
+
+ set baseboard [lindex [split $hostname "/"] 0]
+
+ set board_info($baseboard,isremote) 0
+ set result [remote_exec $hostname $program $args]
+ set board_info($baseboard,isremote) 1
+
+ return $result
+}
+
proc ${board}_download { board host dest } {
return $host
}
--
1.7.7.6