This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] gdb.python/py-prompt.exp: restore GDBFLAGS
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: "Breazeal, Don" <donb at codesourcery dot com>, Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Mon, 12 Jan 2015 17:13:21 +0000
- Subject: [PATCH] gdb.python/py-prompt.exp: restore GDBFLAGS
- Authentication-results: sourceware.org; auth=none
- References: <1418748834-27545-1-git-send-email-palves at redhat dot com> <1418748834-27545-6-git-send-email-palves at redhat dot com> <87wq5qsfaf dot fsf at codesourcery dot com> <54921989 dot 4060005 at redhat dot com> <54AADFA1 dot 9040003 at codesourcery dot com> <54AD5BFC dot 2030906 at redhat dot com> <54AFBA7B dot 6040403 at redhat dot com> <87h9vwpq1x dot fsf_-_ at redhat dot com> <54B3ACD0 dot 60208 at redhat dot com> <878uh8os5m dot fsf at redhat dot com> <54B3FDC6 dot 5070609 at redhat dot com>
On 01/12/2015 05:00 PM, Pedro Alves wrote:
> On 01/12/2015 04:55 PM, Sergio Durigan Junior wrote:
>
>> Running the testcase alone seems to be fine. The problem happens when
>> you run the entire gdb.python/ directory:
>>
>> make check RUNTESTFLAGS="--target_board=native-gdbserver --directory=gdb.python"
>
> Ah, yes. I see the bug. Will push a fix in a bit.
Pushed now. Thanks!
-----
Subject: [PATCH] gdb.python/py-prompt.exp: restore GDBFLAGS
The previous change to py-prompt.exp made it return without restoring
GDBFLAGS, resulting in breaking the following tests:
$ make check RUNTESTFLAGS="--target_board=native-gdbserver --directory=gdb.python"
...
Running src/gdb/testsuite/gdb.python/py-prompt.exp ...
Running src/gdb/testsuite/gdb.python/py-section-script.exp ...
ERROR: (timeout) GDB never initialized after 10 seconds.
ERROR: no fileid for gdbuild
ERROR: Couldn't send python print ('test') to GDB.
ERROR: no fileid for gdbuild
ERROR: Couldn't send python print (sys.version_info[0]) to GDB.
ERROR: no fileid for gdbuild
ERROR: Couldn't send python print (sys.version_info[1]) to GDB.
ERROR: no fileid for gdbuild
ERROR: no fileid for gdbuild
...
gdb/testsuite/
2015-01-12 Pedro Alves <palves@redhat.com>
* gdb.python/py-prompt.exp: When the board can't spawn for attach,
restore GDBFLAGS before returning.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.python/py-prompt.exp | 1 +
2 files changed, 6 insertions(+)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7343d03..db1f521 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-12 Pedro Alves <palves@redhat.com>
+
+ * gdb.python/py-prompt.exp: When the board can't spawn for attach,
+ restore GDBFLAGS before returning.
+
2015-01-12 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.python/py-frame.exp (test Frame.read_register(rip)): Use
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index 55f0f59..0f7a3a4 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -76,6 +76,7 @@ gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
gdb_exit
if {![can_spawn_for_attach]} {
+ set GDBFLAGS $saved_gdbflags
return 0
}
--
1.9.3