diff options
author | Tom de Vries <tdevries@suse.de> | 2025-08-26 12:24:19 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-08-26 12:24:19 +0200 |
commit | 81e5a23c7b8008d3460f8d0c8050d886fe754523 (patch) | |
tree | 75ce584824bc25c0d2969661df85115f0911469d | |
parent | 71897894a941967f50764a7e65ba44f28c137091 (diff) | |
download | gdb-master.zip gdb-master.tar.gz gdb-master.tar.bz2 |
On x86_64-freebsd, I ran into trouble with test-case
gdb.dwarf2/macro-source-path-clang14-dw4.exp (and similar), and I managed to
reproduce the problem on x86_64-linux by making dwarf2_support return 0.
The failure looks like:
...
UNSUPPORTED: $exp: require failed: dwarf2_support
UNRESOLVED: $exp: testcase aborted due to invalid command name: do_test
ERROR: tcl error sourcing $exp.
...
I fixed a similar problem in commit 3e488d8ccd0 ("[gdb/testsuite] Fix
gdb.dwarf2/dw-form-strx-out-of-bounds.exp with make-check-all.sh").
Fix this by moving "require dwarf2_support" from
gdb.dwarf2/macro-source-path.exp.tcl to the files including it.
Tested on x86_64-linux.
6 files changed, 10 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw4.exp b/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw4.exp index c0c2635..dc3826e 100644 --- a/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw4.exp +++ b/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw4.exp @@ -18,6 +18,8 @@ # Generate binaries imitating different ways source file paths can be passed to # compilers. Test printing macros from those binaries. +require dwarf2_support + # The do_test proc comes from macro-source-path.exp.tcl. source $srcdir/$subdir/macro-source-path.exp.tcl diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw5.exp b/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw5.exp index 0b3239e..a3ae2ea 100644 --- a/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw5.exp +++ b/gdb/testsuite/gdb.dwarf2/macro-source-path-clang14-dw5.exp @@ -18,6 +18,8 @@ # Generate binaries imitating different ways source file paths can be passed to # compilers. Test printing macros from those binaries. +require dwarf2_support + # The do_test proc comes from macro-source-path.exp.tcl. source $srcdir/$subdir/macro-source-path.exp.tcl diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld234-dw5.exp b/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld234-dw5.exp index 940f997..7960981 100644 --- a/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld234-dw5.exp +++ b/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld234-dw5.exp @@ -18,6 +18,8 @@ # Generate binaries imitating different ways source file paths can be passed to # compilers. Test printing macros from those binaries. +require dwarf2_support + # The do_test proc comes from macro-source-path.exp.tcl. source $srcdir/$subdir/macro-source-path.exp.tcl diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw4.exp b/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw4.exp index dea0308..6224245 100644 --- a/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw4.exp +++ b/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw4.exp @@ -18,6 +18,8 @@ # Generate binaries imitating different ways source file paths can be passed to # compilers. Test printing macros from those binaries. +require dwarf2_support + # The do_test proc comes from macro-source-path.exp.tcl. source $srcdir/$subdir/macro-source-path.exp.tcl diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw5.exp b/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw5.exp index 98a278e..37b03b9 100644 --- a/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw5.exp +++ b/gdb/testsuite/gdb.dwarf2/macro-source-path-gcc11-ld238-dw5.exp @@ -18,6 +18,8 @@ # Generate binaries imitating different ways source file paths can be passed to # compilers. Test printing macros from those binaries. +require dwarf2_support + # The do_test proc comes from macro-source-path.exp.tcl. source $srcdir/$subdir/macro-source-path.exp.tcl diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl index ecaf685..f45d1b0 100644 --- a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl +++ b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl @@ -23,8 +23,6 @@ load_lib dwarf.exp -require dwarf2_support - standard_testfile macro-source-path.c lassign [function_range main $srcdir/$subdir/$srcfile] \ |