* [committed, obvious] gdb/testsuite: fix TCL error in py-format-string.exp
@ 2020-06-17 20:52 Sandra Loosemore
0 siblings, 0 replies; only message in thread
From: Sandra Loosemore @ 2020-06-17 20:52 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
When GDB is built without python support, I've been seeing this TCL error:
(gdb) UNSUPPORTED: gdb.python/py-format-string.exp: format_string:
lang_c: Python support is disabled.
ERROR: tcl error sourcing
/path/to/gdb/testsuite/gdb.python/py-format-string.exp.
ERROR: invoked "continue" outside of a loop
The test for python support is the same one being used in all the
gdb.python tests, it is just in the wrong place, inside a function
instead of at top level, where it cannot meaningfully "continue". I've
fixed it by moving the test earlier in the file, outside the function.
I think this is sufficiently obvious that I've gone ahead and checked in
this patch.
-Sandra
[-- Attachment #2: tcl-error.patch --]
[-- Type: text/x-patch, Size: 1722 bytes --]
commit 05e682e3be7e3d9d63ec358dcf8943fd200545cb
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Wed Jun 17 13:43:32 2020 -0700
Fix TCL error in gdb.python/py-format-string.exp.
2020-06-17 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.python/py-format-string.exp: Move test for python support
earlier, out of function body.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5d76719..2d60408 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2020-06-17 Sandra Loosemore <sandra@codesourcery.com>
+
+ Fix TCL error in gdb.python/py-format-string.exp.
+
+ * gdb.python/py-format-string.exp: Move test for python support
+ earlier, out of function body.
+
2020-06-15 Simon Marchi <simon.marchi@efficios.com>
* gdb.base/index-cache-load-twice.c: New.
diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp
index f809ef3..792d60c 100644
--- a/gdb/testsuite/gdb.python/py-format-string.exp
+++ b/gdb/testsuite/gdb.python/py-format-string.exp
@@ -24,6 +24,11 @@ if [get_compiler_info c++] {
return -1
}
+# Skip all tests if Python scripting is not enabled.
+gdb_exit
+gdb_start
+if { [skip_python_tests] } { continue }
+
# Build inferior to language specification.
proc build_inferior {exefile lang} {
global srcdir subdir srcfile testfile hex
@@ -45,9 +50,6 @@ proc prepare_gdb {exefile} {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${exefile}
- # Skip all tests if Python scripting is not enabled.
- if { [skip_python_tests] } { continue }
-
if ![runto_main] then {
perror "couldn't run to breakpoint"
return
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-17 20:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 20:52 [committed, obvious] gdb/testsuite: fix TCL error in py-format-string.exp Sandra Loosemore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).