aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuinevere Larsen <blarsen@redhat.com>2024-07-31 11:23:51 -0300
committerGuinevere Larsen <blarsen@redhat.com>2024-08-02 09:06:26 -0300
commit853d02bc0701a789ffcad0e429c0f36319852857 (patch)
treee92e86ed2d510db8cd979b63ad1ba3edd7a83cb4
parent4a9843c301e5453ae21639e500b9b2bd62ff1e69 (diff)
downloadgdb-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.exp2
-rw-r--r--gdb/testsuite/gdb.python/py-missing-debug.exp3
-rw-r--r--gdb/testsuite/gdb.server/remote-read-msgs.exp3
-rw-r--r--gdb/testsuite/gdb.server/solib-list.exp2
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
}