From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Mw0iEy0uFGA6JAAAWB0awg (envelope-from ) for ; Fri, 29 Jan 2021 10:47:57 -0500 Received: by simark.ca (Postfix, from userid 112) id 3CAFC1EF80; Fri, 29 Jan 2021 10:47:57 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2FD6E1E945 for ; Fri, 29 Jan 2021 10:47:56 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6A13385782B; Fri, 29 Jan 2021 15:47:55 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 83438385782B for ; Fri, 29 Jan 2021 15:47:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 83438385782B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9FE31ABDA for ; Fri, 29 Jan 2021 15:47:52 +0000 (UTC) Date: Fri, 29 Jan 2021 16:47:50 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Add KFAILs for PR symtab/24549 Message-ID: <20210129154749.GA15479@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, When an executable contains an index such as a .gdb_index or .debug_names section, gdb ignores the DW_AT_subprogram attribute. This problem has been filed as PR symtab/24549. Add KFAILs for this PR in test-cases gdb.dwarf2/main-subprogram.exp and gdb.fortran/mixed-lang-stack.exp. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Add KFAILs for PR symtab/24549 gdb/testsuite/ChangeLog: 2021-01-29 Tom de Vries * gdb.dwarf2/main-subprogram.exp: Add KFAIL for PR symtab/24549. * gdb.fortran/mixed-lang-stack.exp: Same. --- gdb/testsuite/gdb.dwarf2/main-subprogram.exp | 14 +++++++++++++- gdb/testsuite/gdb.fortran/mixed-lang-stack.exp | 21 +++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp index ad0113e404d..c618a40f2fb 100644 --- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp +++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp @@ -55,6 +55,8 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \ return -1 } +set have_index [exec_has_index_section $binfile] + # Test that the "start" command stops in the "mymain" function. # This should happen because we used DW_AT_main_subprogram to tell gdb # that this was the real "main". @@ -64,4 +66,14 @@ if {[gdb_start_cmd] < 0} { return -1 } -gdb_test "" "Temporary breakpoint .* mymain.*" "stopped at mymain" +gdb_test_multiple "" "stopped at mymain" { + -re -wrap "Temporary breakpoint .* mymain.*" { + pass $gdb_test_name + } + -re -wrap "Temporary breakpoint .* main.*" { + if { $have_index } { + setup_kfail "gdb/24549" *-*-* + } + fail $gdb_test_name + } +} diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp index 411fd784dc0..6a249e60f2f 100644 --- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp +++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp @@ -35,11 +35,13 @@ if {[prepare_for_testing_full "failed to prepare" \ return -1 } +set have_index [exec_has_index_section $binfile] + # Runs the test program and examins the stack. LANG is a string, the # value to pass to GDB's 'set language ...' command. proc run_tests { lang } { with_test_prefix "lang=${lang}" { - global binfile hex + global binfile hex have_index clean_restart ${binfile} @@ -74,7 +76,22 @@ proc run_tests { lang } { "#7\\s+$hex in mixed_func_1b \\($1b_args\\) at \[^\r\n\]+" \ "#8\\s+$hex in mixed_func_1a \\(\\) at \[^\r\n\]+" \ "#9\\s+$hex in mixed_stack_main \\(\\) at \[^\r\n\]+" ] - gdb_test "bt -frame-arguments all" $bt_stack + set main_args "argc=1, argv=${hex}( \[^\r\n\]+)?" + set bt_stack_kfail \ + [multi_line \ + $bt_stack \ + "#10\\s+$hex in main \\($main_args\\) at \[^\r\n\]+"] + gdb_test_multiple "bt -frame-arguments all" "" { + -re -wrap $bt_stack { + pass $gdb_test_name + } + -re -wrap $bt_stack_kfail { + if { $have_index } { + setup_kfail "gdb/24549" *-*-* + } + fail $gdb_test_name + } + } # Check the language for frame #0. gdb_test "info frame" "source language fortran\..*" \