From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id CFD653858430 for ; Mon, 7 Mar 2022 19:53:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CFD653858430 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-223-v9FZuNPCOW6rj9CI8oE9oA-1; Mon, 07 Mar 2022 14:53:16 -0500 X-MC-Unique: v9FZuNPCOW6rj9CI8oE9oA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48B28801DDC; Mon, 7 Mar 2022 19:53:15 +0000 (UTC) Received: from [10.97.116.31] (ovpn-116-31.gru2.redhat.com [10.97.116.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C09D5DD68; Mon, 7 Mar 2022 19:53:13 +0000 (UTC) Message-ID: Date: Mon, 7 Mar 2022 16:53:10 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH 03/11] Change gdb.base/skip-solib.exp deal with lack of epilogue information To: Pedro Alves , gdb-patches@sourceware.org References: <20220126195053.69559-1-blarsen@redhat.com> <20220126195053.69559-4-blarsen@redhat.com> <76afd937-0202-9bde-aee1-c8f3f1119777@palves.net> From: Bruno Larsen In-Reply-To: <76afd937-0202-9bde-aee1-c8f3f1119777@palves.net> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 07 Mar 2022 19:53:18 -0000 On 3/2/22 13:17, Pedro Alves wrote: > On 2022-01-26 19:50, Bruno Larsen via Gdb-patches wrote: >> When testing with clang, this feature worked, but the test failed >> because it checked specifically to see if we were at the main function. >> Without epilogue information, the inferior would be at libc_start_main >> (or equivalent) instead. Having this test changed would allows us to >> identify if the test stops working for real at some point. > > I'm having trouble understanding what you're saying. I wonder whether > pasting a snippet of the failing case would help? > >> --- >> gdb/testsuite/gdb.base/skip-solib.exp | 11 +++++++++-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >> >> diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp >> index ce2b080229e..99833533b6a 100644 >> --- a/gdb/testsuite/gdb.base/skip-solib.exp >> +++ b/gdb/testsuite/gdb.base/skip-solib.exp >> @@ -82,7 +82,7 @@ with_test_prefix "ignoring solib file" { >> # We shouldn't step into square(), since we skipped skip-solib-lib.c. >> # >> gdb_test "step" "" >> - gdb_test "bt" "#0\\s+main.*" >> + gdb_test "bt 1" "#0.*main.*" > > Is the tweak here to change the regexp to match both "main" and "libc_start_main"? Sorry about the confusing commit message. Yes, this was the plan. Essentially, the test was failing because we dropped to libc_start_main and it expected to still be in main. I have changed my mind on this approach, however. V2 should be coming shortly. > >> } >> >> # >> @@ -114,5 +114,12 @@ with_test_prefix "ignoring solib function" { >> # the last line of square. >> # >> gdb_test "step" "" >> - gdb_test "bt" "#0\\s+square.*" >> + gdb_test_multiple "bt 1" "skipped multiply" { >> + -re "#0\\s+square.*" { >> + pass "skipped multiply" >> + } >> + -re "#0.*main.*" { >> + pass "skipped multiply" >> + } >> + } >> } > -- Cheers! Bruno Larsen