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 DCB9C3856DD6 for ; Mon, 12 Sep 2022 12:18:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DCB9C3856DD6 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-139-QVcLYxNyPtGbyvivTc4MBQ-1; Mon, 12 Sep 2022 08:18:12 -0400 X-MC-Unique: QVcLYxNyPtGbyvivTc4MBQ-1 Received: by mail-wm1-f69.google.com with SMTP id h4-20020a1c2104000000b003b334af7d50so6799868wmh.3 for ; Mon, 12 Sep 2022 05:18:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=2P3Gkti8aVTuLHGrrEasRtpzwMVZXaWUMllNTSbOoKY=; b=uFhTNuVgXNa7IiXdX12T7OH2uABhEZR/J0l4MvPg0voaoAjs9b4+tJcS5GvSjQTm0G EuAf+u307TAuhKEhPoJVE3sYkZXfZiXO/gpa3Yutzsd80RK3U7Fz1g6oNsa1cOKXhAyY A7bVD/M19CRQ++qQ6+x+LXsLB0DPGv4x/C2I7MFS8zTNpD/W4d3yLl1uTfpeudxtjDgE pUOY90IkWCdLeBnwX8i2KhDjm7CIpkaTGodU+jftXKt81KL2tWaZMLltQhlwcg7eZe2t V6hVL5g3b3k526jE0kK7/s9kjDykrzGEY9dIVGlyvZFPMDZPPXORi1nCXD+WQaOzZtWZ 5HWQ== X-Gm-Message-State: ACgBeo0h6Sl4tTqyimJlZj2aHUhV+im3Yd8Gt7UhXfcwXIGL1+Ji8a7R Z+1PkC2ZxoqslwkRx1ucOZCqZ7EiElZe7c06FYmB0F9+XHeJj4Hi0V6MWKW5R7dSzwDg1HA39qI kiesk4oS/QJ2HOzfUXlGb+A== X-Received: by 2002:a5d:564e:0:b0:228:d609:7ac3 with SMTP id j14-20020a5d564e000000b00228d6097ac3mr14654330wrw.27.1662985091320; Mon, 12 Sep 2022 05:18:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR49/LItuwyx6wfe17r5QvcYH/sQoVqtyX9NRi77PQT+R+s8a4c2zFnat8DoJ5BTORv2Thv0IQ== X-Received: by 2002:a5d:564e:0:b0:228:d609:7ac3 with SMTP id j14-20020a5d564e000000b00228d6097ac3mr14654317wrw.27.1662985091083; Mon, 12 Sep 2022 05:18:11 -0700 (PDT) Received: from [10.43.2.105] (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id z11-20020a7bc7cb000000b003b3401f1e24sm9660957wmk.28.2022.09.12.05.18.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Sep 2022 05:18:10 -0700 (PDT) Message-ID: <58826121-e72f-2832-711d-28e0c4ceb7cd@redhat.com> Date: Mon, 12 Sep 2022 14:18:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v4 05/15] update gdb.base/info-program.exp to not fail with clang To: Andrew Burgess , gdb-patches@sourceware.org References: <20220720194441.168906-1-blarsen@redhat.com> <20220720194441.168906-7-blarsen@redhat.com> <87sfkxkkbb.fsf@redhat.com> From: Bruno Larsen In-Reply-To: <87sfkxkkbb.fsf@redhat.com> 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=-14.0 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_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 12 Sep 2022 12:18:15 -0000 Thanks, I applied your comments and pushed! Cheers, Bruno On 12/09/2022 11:34, Andrew Burgess wrote: > Bruno Larsen via Gdb-patches writes: > >> The updated test specifically mentions that it doesn't care where the > I think this sentence makes more sense without 'updated'. > >> program stops, however it was still testing for something. With this > s/something/a specific location/ ? > > I think it might be worth adding a sentence before the 'With this...'. > > The clang compiler emits different line information for function > epilogue, and so GDB reports the stop at a different location. > > Then finish with: 'With this patch the test works even with clang.' > >> correction, the test works even if the compiler doesn't emit line table >> entries for the function epilogue. >> --- >> gdb/testsuite/gdb.base/info-program.exp | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gdb/testsuite/gdb.base/info-program.exp b/gdb/testsuite/gdb.base/info-program.exp >> index facc13efa2f..f652cfbf426 100644 >> --- a/gdb/testsuite/gdb.base/info-program.exp >> +++ b/gdb/testsuite/gdb.base/info-program.exp >> @@ -28,7 +28,7 @@ gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped at breakpoint $ >> >> # We don't really care where this step lands, so long as it gets >> # the inferior pushed off the breakpoint it's currently on... >> -gdb_test "next" "$decimal\t.*" "step before info program" >> +gdb_test "next" ".*" "step before info program" > I think I'd be tempted to rewrite this comment. Currently we say that > we don't care where we stop, just so long as we stop somewhere else. > The test used to ensure that we did indeed stop somewhere else. The > problem is with clang, that somewhere else might be different. But, but > using '.*' as a pattern, we're not actually checking that we've moved at > all. > > However, I don't think that actually matters, based on the next thing we > do, I think this comment would do: > > # We don't really care where this `next` lands, so long as GDB reports > # that the inferior stopped due to a step in the subsequent test. > > With these changes I think this patch can be merged. > > Thanks, > Andrew > >> >> gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped after being stepped\.\r\nType \"info stack\" or \"info registers\" for more information\." \ >> "info program after next" >> -- >> 2.31.1