From 05e682e3be7e3d9d63ec358dcf8943fd200545cb Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Wed, 17 Jun 2020 13:43:32 -0700 Subject: [PATCH] Fix TCL error in gdb.python/py-format-string.exp. 2020-06-17 Sandra Loosemore gdb/testsuite/ * gdb.python/py-format-string.exp: Move test for python support earlier, out of function body. --- gdb/testsuite/ChangeLog | 7 +++++++ gdb/testsuite/gdb.python/py-format-string.exp | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5d7671915a..2d60408998 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-06-17 Sandra Loosemore + + 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 * 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 f809ef30cb..792d60c09d 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 -- 2.34.1