[committed, obvious] gdb/testsuite: fix TCL error in py-format-string.exp

Sandra Loosemore sandra@codesourcery.com
Wed Jun 17 20:52:45 GMT 2020


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcl-error.patch
Type: text/x-patch
Size: 1722 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20200617/da9718cb/attachment.bin>


More information about the Gdb-patches mailing list