[binutils-gdb] [gdb/testsuite] Fix unopened-quote errors (part 2)
Tom de Vries via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d9c820943411c517542fbf266a45ae8e52416299 commit d9c820943411c517542fbf266a45ae8e52416299 Author: Tom de Vries <[email protected]> Date: Tue Mar 24 16:29:17 2026 +0100 [gdb/testsuite] Fix unopened-quote errors (part 2) Fix tclint unopened-quote errors using quote_for_host. While we're at it, add a missing gdb_download_shlib to fix a failure with target board remote-gdbserver-on-localhost. I was not able to test the changes in gdb.rocm. Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp | 5 ++++- gdb/testsuite/gdb.base/rtld-step.exp | 5 ++++- gdb/testsuite/gdb.linespec/line-breakpoint-outside-function.exp | 9 ++++++++- gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp | 6 +++++- gdb/testsuite/gdb.python/py-template.exp | 7 +++++-- gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp | 8 ++++++-- gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp | 6 ++++-- gdb/testsuite/lib/gdb.exp | 6 +++--- 8 files changed, 39 insertions(+), 13 deletions(-) diff --git a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp index 67038f18fe3..b3c240b8a8f 100644 --- a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp +++ b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp @@ -35,7 +35,10 @@ if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $shlib_path {debug}] != "" } { set shlib_path_target [gdb_download_shlib $::shlib_path] -set opts [list shlib_load additional_flags=-DSHLIB_PATH="${shlib_path_target}"] +set opts {} +lappend opts shlib_load +lappend opts additional_flags=-DSHLIB_PATH=[quote_for_host $shlib_path_target] + if { [build_executable "failed to prepare" ${testfile} ${srcfile} $opts] } { return } diff --git a/gdb/testsuite/gdb.base/rtld-step.exp b/gdb/testsuite/gdb.base/rtld-step.exp index 86fc375a2c9..3beab5ee334 100644 --- a/gdb/testsuite/gdb.base/rtld-step.exp +++ b/gdb/testsuite/gdb.base/rtld-step.exp @@ -100,7 +100,10 @@ if { ![gdb_can_simple_compile static-pie-static-libc \ set main_basename ${::gdb_test_file_name}-main set srcfile_main ${srcdir}/${subdir}/${main_basename}.c set binfile_main [standard_output_file ${main_basename}] -set main_flags [list debug additional_flags="-Wl,--dynamic-linker=${binfile_rtld}"] +set main_flags {} +lappend main_flags debug +lappend main_flags \ + additional_flags=[quote_for_host -Wl,--dynamic-linker=$binfile_rtld] # Compile pretend RTLD: if { [gdb_compile ${srcfile_rtld} ${binfile_rtld} executable $rtld_flags] != "" } { diff --git a/gdb/testsuite/gdb.linespec/line-breakpoint-outside-function.exp b/gdb/testsuite/gdb.linespec/line-breakpoint-outside-function.exp index 064473f3c56..01919ffbc75 100644 --- a/gdb/testsuite/gdb.linespec/line-breakpoint-outside-function.exp +++ b/gdb/testsuite/gdb.linespec/line-breakpoint-outside-function.exp @@ -26,7 +26,14 @@ if {[build_executable "build shlib" $shlib_path $srcfile {debug shlib}]} { return } -set opts [list debug shlib_load additional_flags=-DTHE_LIB_PATH="${shlib_path}"] +set remote_shlib_path [gdb_download_shlib $shlib_path] + +set opts {} +lappend opts debug +lappend opts shlib_load +lappend opts \ + additional_flags=-DTHE_LIB_PATH=[quote_for_host ${remote_shlib_path}] + if {[build_executable "failed to prepare" ${testfile} ${srcfile} $opts]} { return } diff --git a/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp b/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp index 571bf01cca0..45e64bcc2c5 100644 --- a/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp +++ b/gdb/testsuite/gdb.mi/mi-var-invalidate-shlib.exp @@ -32,7 +32,11 @@ if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $shlib_path {debug}] != "" } { set shlib_path_target [gdb_download_shlib $shlib_path] -set opts [list shlib_load debug additional_flags=-DSHLIB_PATH="${shlib_path_target}"] +set opts {} +lappend opts shlib_load +lappend opts debug +lappend opts additional_flags=-DSHLIB_PATH=[quote_for_host $shlib_path_target] + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } { untested "failed to compile" return -1 diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp index 5a3c259673b..1bf3604e98f 100644 --- a/gdb/testsuite/gdb.python/py-template.exp +++ b/gdb/testsuite/gdb.python/py-template.exp @@ -29,9 +29,12 @@ clean_restart proc test_template_arg {exefile type} { global testfile srcdir subdir srcfile + set opts {} + lappend opts debug + lappend opts c++ + lappend opts additional_flags=[quote_for_host -DTYPE=$type] if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" \ - executable \ - [list debug c++ additional_flags="-DTYPE=$type"]] != "" } { + executable $opts] != "" } { untested $type return -1 } diff --git a/gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp b/gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp index b4a3f4db511..d351555bfff 100644 --- a/gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp +++ b/gdb/testsuite/gdb.rocm/fork-exec-gpu-to-non-gpu.exp @@ -31,8 +31,12 @@ set binfile_execee "$binfile-execee" # Compile two versions of execer, one that uses fork and one that uses vfork. foreach_with_prefix fork_func { fork vfork } { - set opts [list debug hip additional_flags=-DFORK=$fork_func \ - additional_flags=-DEXECEE="${::binfile_execee}"] + set opts {} + lappend opts debug + lappend opts hip + lappend opts additional_flags=-DFORK=$fork_func + lappend opts additional_flags=-DEXECEE=[quote_for_host $::binfile_execee] + if {[build_executable "failed to prepare" ${::binfile}-execer-${fork_func} \ $srcfile_execer $opts]} { return diff --git a/gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp b/gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp index 2314a5bde74..57dfac9fcec 100644 --- a/gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp +++ b/gdb/testsuite/gdb.rocm/fork-exec-non-gpu-to-gpu.exp @@ -30,8 +30,10 @@ set binfile_execee "$binfile-execee" # Compile two versions of execer, one that uses fork and one that uses vfork. foreach_with_prefix fork_func { fork vfork } { - set opts [list additional_flags=-DFORK=$fork_func \ - additional_flags=-DEXECEE="${::binfile_execee}"] + set opts {} + lappend opts additional_flags=-DFORK=$fork_func + lappend opts additional_flags=-DEXECEE=[quote_for_host $::binfile_execee] + if {[build_executable "failed to prepare" ${::binfile}-execer-${fork_func} \ $srcfile_execer $opts]} { return diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 218e5910ffb..28709004570 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -10868,7 +10868,7 @@ gdb_caching_proc have_fvar_tracking {} { # Return 1 if linker supports -Ttext-segment, otherwise return 0. gdb_caching_proc linker_supports_Ttext_segment_flag {} { set me "linker_supports_Ttext_segment_flag" - set flags ldflags="-Wl,-Ttext-segment=0x7000000" + set flags ldflags=[quote_for_host -Wl,-Ttext-segment=0x7000000] set src { int main() { return 0; } } return [gdb_simple_compile $me $src executable $flags] } @@ -10876,7 +10876,7 @@ gdb_caching_proc linker_supports_Ttext_segment_flag {} { # Return 1 if linker supports -Ttext, otherwise return 0. gdb_caching_proc linker_supports_Ttext_flag {} { set me "linker_supports_Ttext_flag" - set flags ldflags="-Wl,-Ttext=0x7000000" + set flags ldflags=[quote_for_host -Wl,-Ttext=0x7000000] set src { int main() { return 0; } } return [gdb_simple_compile $me $src executable $flags] } @@ -10884,7 +10884,7 @@ gdb_caching_proc linker_supports_Ttext_flag {} { # Return 1 if linker supports --image-base, otherwise 0. gdb_caching_proc linker_supports_image_base_flag {} { set me "linker_supports_image_base_flag" - set flags ldflags="-Wl,--image-base=0x7000000" + set flags ldflags=[quote_for_host -Wl,--image-base=0x7000000] set src { int main() { return 0; } } return [gdb_simple_compile $me $src executable $flags] }