]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: add build-id compile flag to tests that expect it
authorGuinevere Larsen <blarsen@redhat.com>
Wed, 31 Jul 2024 14:23:51 +0000 (11:23 -0300)
committerGuinevere Larsen <blarsen@redhat.com>
Fri, 2 Aug 2024 12:06:26 +0000 (09:06 -0300)
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>
gdb/testsuite/gdb.base/coredump-filter-build-id.exp
gdb/testsuite/gdb.python/py-missing-debug.exp
gdb/testsuite/gdb.server/remote-read-msgs.exp
gdb/testsuite/gdb.server/solib-list.exp

index b62796f080d08dc34a490f2e03c60eab5c8e459b..cddacce20c4ec5ba01a90dd152916ae436f79515 100644 (file)
@@ -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
 }
 
index d1eef34c3f3b95d10248bc22419a17c5854565c9..dfc0a467b2ad3aa986fa60cc13f7fc40cf736f62 100644 (file)
@@ -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
 }
 
index d2d659aa3650efe44623355ac8e29d25701bb322..e204655b044c9d41d2ffd82d8610f65d1a440ed2 100644 (file)
@@ -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
 }
 
index b9cc6c81d58b795987071b48017a9cdf1c99d950..bbc5df47c11f372ddfc5c97c62d40222826b9075 100644 (file)
@@ -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
 }