diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-27 13:58:09 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-27 13:58:09 +0200 |
commit | d0498b325e3c5d65372087fde46351b55980f111 (patch) | |
tree | 79382085ab52d9bf6645766b081ff16ebe7058b3 /gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp | |
parent | 845d99df89b8eee01de354f49489b2863673122c (diff) | |
download | gdb-d0498b325e3c5d65372087fde46351b55980f111.zip gdb-d0498b325e3c5d65372087fde46351b55980f111.tar.gz gdb-d0498b325e3c5d65372087fde46351b55980f111.tar.bz2 |
[gdb/testsuite] Fix quoting issues in gdb.dwarf2 for remote host
A few test-cases in gdb.dwarf2 use something like:
...
additional_flags=\"-DFOO=BAR + 10\"
...
which doesn't work on remote host.
Fix this by introducing a new proc quote_for_host that also works for remote
host, such that we have:
...
additional_flags=[quote_for_host -DFOO=BAR + 10]
...
Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp index d9a552a..09c484a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp @@ -25,12 +25,18 @@ lassign [function_range func_loopfb \ "${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}"] \ func_loopfb_start func_loopfb_len -set flags \ - [list \ - "additional_flags=\"-DFUNC_NOFB_START=$func_nofb_start\"" \ - "additional_flags=\"-DFUNC_NOFB_END=$func_nofb_start + $func_nofb_len\"" \ - "additional_flags=\"-DFUNC_LOOPFB_START=$func_loopfb_start\"" \ - "additional_flags=\"-DFUNC_LOOPFB_END=$func_loopfb_start + $func_loopfb_len\""] +set flags {} +lappend flags \ + additional_flags=[quote_for_host -DFUNC_NOFB_START=$func_nofb_start] +lappend flags \ + additional_flags=[quote_for_host -DFUNC_NOFB_END=$func_nofb_start \ + + $func_nofb_len] +lappend flags \ + additional_flags=[quote_for_host -DFUNC_LOOPFB_START=$func_loopfb_start] +lappend flags \ + additional_flags=[quote_for_host -DFUNC_LOOPFB_END=$func_loopfb_start \ + + $func_loopfb_len] + set executable ${testfile} if { [prepare_for_testing_full "failed to prepare" \ |