diff options
author | Guinevere Larsen <blarsen@redhat.com> | 2024-07-31 11:23:51 -0300 |
---|---|---|
committer | Guinevere Larsen <blarsen@redhat.com> | 2024-08-02 09:06:26 -0300 |
commit | 853d02bc0701a789ffcad0e429c0f36319852857 (patch) | |
tree | e92e86ed2d510db8cd979b63ad1ba3edd7a83cb4 | |
parent | 4a9843c301e5453ae21639e500b9b2bd62ff1e69 (diff) | |
download | gdb-853d02bc0701a789ffcad0e429c0f36319852857.zip gdb-853d02bc0701a789ffcad0e429c0f36319852857.tar.gz gdb-853d02bc0701a789ffcad0e429c0f36319852857.tar.bz2 |
gdb/testsuite: add build-id compile flag to tests that expect it
Clang doesn't add build-id information by default, unlike gcc. This
means that tests that rely on build-id being available and don't
explicitly add it to the compilation options will fail with clang.
This commit fixes the fails in gdb.python/py-missing-debug.exp,
gdb.server/remote-read-msgs.exp, gdb.base/coredump-filter-build-id.exp
and gdb.server/solib-list.exp
Approved-By: Andrew Burgess <aburgess@redhat.com>
-rw-r--r-- | gdb/testsuite/gdb.base/coredump-filter-build-id.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-missing-debug.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/remote-read-msgs.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/solib-list.exp | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.base/coredump-filter-build-id.exp b/gdb/testsuite/gdb.base/coredump-filter-build-id.exp index b62796f..cddacce 100644 --- a/gdb/testsuite/gdb.base/coredump-filter-build-id.exp +++ b/gdb/testsuite/gdb.base/coredump-filter-build-id.exp @@ -30,7 +30,7 @@ if { ![istarget *-*-linux*] } { } require is_x86_64_m64_target -if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } { +if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug build-id}] } { return -1 } diff --git a/gdb/testsuite/gdb.python/py-missing-debug.exp b/gdb/testsuite/gdb.python/py-missing-debug.exp index d1eef34..dfc0a46 100644 --- a/gdb/testsuite/gdb.python/py-missing-debug.exp +++ b/gdb/testsuite/gdb.python/py-missing-debug.exp @@ -19,7 +19,8 @@ require allow_python_tests standard_testfile -if {[build_executable "failed to prepare" ${testfile} ${srcfile}]} { +if {[build_executable "failed to prepare" ${testfile} ${srcfile} \ + {debug build-id}]} { return -1 } diff --git a/gdb/testsuite/gdb.server/remote-read-msgs.exp b/gdb/testsuite/gdb.server/remote-read-msgs.exp index d2d659a..e204655 100644 --- a/gdb/testsuite/gdb.server/remote-read-msgs.exp +++ b/gdb/testsuite/gdb.server/remote-read-msgs.exp @@ -30,7 +30,8 @@ require {!is_remote host} standard_testfile -if {[build_executable "failed to prepare" $testfile $srcfile] == -1} { +if {[build_executable "failed to prepare" $testfile $srcfile \ + {debug build-id}] == -1} { return -1 } diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp index b9cc6c8..bbc5df4 100644 --- a/gdb/testsuite/gdb.server/solib-list.exp +++ b/gdb/testsuite/gdb.server/solib-list.exp @@ -30,7 +30,7 @@ set srclibfile ${testfile}-lib.c set binlibfile [standard_output_file ${testfile}.so] if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" {debug}] != "" - || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "shlib=${binlibfile}"] != "" } { + || [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "shlib=${binlibfile} build-id"] != "" } { untested "failed to compile" return -1 } |