From 9162d24e6199f399b9f3dd56e9b95ef735aa9d8b Mon Sep 17 00:00:00 2001 From: Guinevere Larsen Date: Tue, 23 Jul 2024 16:37:48 -0300 Subject: [PATCH] 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 --- gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp index 73b25bde86a..b91f915f7cf 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] -- 2.39.5