]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: skip gdb.mi/dw2-ref-missing-frame.exp with clang
authorGuinevere Larsen <blarsen@redhat.com>
Tue, 23 Jul 2024 19:37:48 +0000 (16:37 -0300)
committerGuinevere Larsen <blarsen@redhat.com>
Tue, 17 Sep 2024 20:18:54 +0000 (17:18 -0300)
The test gdb.mi/dw2-ref-missing-frame.exp uses the old-school way to set
debug information by hand, using a .S file and assembly labels to get
addresses. Unfortunately, clang will always re-arrange the global labels
to be side by side, making high and low PC for CUs and functions be the
same, and thus they will all be empty ranges. This makes the test fail,
since we never technically enter the functions that we want to check.

This commit skips that test when using clang. If we ever port this test
to use the dwarf assembler, we can reenable it with clang.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp

index 73b25bde86af846d162a24a99956e5e83d71c78c..b91f915f7cf7892ed1a9363dc11535fe0fd47c8f 100644 (file)
@@ -20,6 +20,16 @@ set MIFLAGS "-i=mi"
 
 require dwarf2_support
 
+# Clang reorders global assembly labels, placing them all side by side.
+# This results in having low and high PCs what have the same value for
+# the CU and all the functions (in my system, they are all 0x1130).  If
+# this test is rewritten to use the dwarf assembler instead, we can enable
+# this test with clang again.
+if {[test_compiler_info {clang-*-*}]} {
+    unsupported "can't generate debug info"
+    return
+}
+
 standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c
 set objsfile [standard_output_file ${testfile}.o]
 set objfuncfile [standard_output_file ${testfile}-func.o]