This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit][obvious] Fix testsuite/gdb.python/py-prompt.exp when cross-debugging
- From: Thiago Jung Bauermann <thiago dot bauermann at linaro dot org>
- To: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Fri, 18 May 2012 22:09:31 -0300
- Subject: [commit][obvious] Fix testsuite/gdb.python/py-prompt.exp when cross-debugging
Hello,
py-prompt.exp execs the test file directly to get its PID so that it can
attach to it later. It borrows the technique from
gdb.server/ext-attach.exp. This doesn't work when the target is of a
different architecture than the host.
This patch does what ext-attach.exp does, which is to quit if the target
is remote.
Committed as obvious.
--
[]'s
Thiago Jung Bauermann
Linaro Toolchain Working Group
2012-05-18 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
* gdb.python/py-prompt.exp: Quit if the target is remote.
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index eacb074..ab17ab9 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -20,6 +20,10 @@ set testfile "py-prompt"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
+# We need to use TCL's exec to get the pid.
+if [is_remote target] then {
+ return 0
+}
load_lib gdb-python.exp
load_lib prompt.exp