aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorGuinevere Larsen <blarsen@redhat.com>2024-07-23 16:37:48 -0300
committerGuinevere Larsen <blarsen@redhat.com>2024-09-17 17:18:54 -0300
commit9162d24e6199f399b9f3dd56e9b95ef735aa9d8b (patch)
treeb5fbeb988172739499667e80c04307df835eccc3 /gdb/testsuite
parent4d91b7105653d39ef9c8507dd25ba426af4879e4 (diff)
downloadgdb-9162d24e6199f399b9f3dd56e9b95ef735aa9d8b.zip
gdb-9162d24e6199f399b9f3dd56e9b95ef735aa9d8b.tar.gz
gdb-9162d24e6199f399b9f3dd56e9b95ef735aa9d8b.tar.bz2
gdb/testsuite: skip gdb.mi/dw2-ref-missing-frame.exp with clang
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>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
index 73b25bd..b91f915 100644
--- a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
@@ -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]