From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 7235D3858D3C for ; Sun, 13 Mar 2022 05:21:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7235D3858D3C Received: by mail-wr1-x429.google.com with SMTP id p9so18930289wra.12 for ; Sat, 12 Mar 2022 21:21:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iVyCXeBQg9IUpC6IW3he8HvjFk1NHqwr/x2CY8fUJHs=; b=o+rGi170uhiN1Yo35R/X8Z8GYWVPLVZJfZNgnu/dr8IwX/5sifAEuewZeQVaDlxIL8 lkEF/Be5HSTXnQr7b1H494xdGb/X/4zx5gw5bkGg++Fajq4UmjW9J5xuCsnYfsfQoRvt kZoRjrLpohHPfkZKz/Dwgptz8t9owjAH7Pxd4d/o2XsTgYUBv0fMzamPmlObS+L/Mpri FXlpLftrAQPQy8is9CHfroCuICld3Jfznr/Rj34bvxP5zBRMyhgNf+tpXErFQRmZZoNx Ofa4oueI+8XOFLwqflTejxuPr5tdIh47Av9j/Q1nH3AYyXZXNau82EqxR8LC0sC31YNi hhBQ== X-Gm-Message-State: AOAM531HnI3p5sH4e0ztElvitKj89ez4oxKFj2RgQoKP5tLfifnqwVAd gRFMBCi89ZbFuYzEAo52cjrD7HMKx2/N X-Google-Smtp-Source: ABdhPJx5JZ3qcyorLVvpIp7CXWQcuamR1vly4RwCr/ZGwTiHmFAQ3MRyMKuG9sVMXPafMFU/8ldC2g== X-Received: by 2002:a5d:4e02:0:b0:1f1:e6fb:543 with SMTP id p2-20020a5d4e02000000b001f1e6fb0543mr12116565wrt.240.1647148899254; Sat, 12 Mar 2022 21:21:39 -0800 (PST) Received: from takamaka.home (lfbn-reu-1-503-119.w92-130.abo.wanadoo.fr. [92.130.90.119]) by smtp.gmail.com with ESMTPSA id n15-20020a05600c4f8f00b003842f011bc5sm15346794wmq.2.2022.03.12.21.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Mar 2022 21:21:38 -0800 (PST) Received: by takamaka.home (Postfix, from userid 1000) id 3E4A9A4AD3; Sun, 13 Mar 2022 09:21:36 +0400 (+04) Date: Sun, 13 Mar 2022 09:21:36 +0400 From: Joel Brobecker To: Carl Love Cc: Joel Brobecker , gdb-patches@sourceware.org, Rogerio Alves Subject: Re: [PATCH] Powerpc fix for gdb.base/ending-run.exp Message-ID: References: <479011be1a832692f38293ebf6f9cc0fd18315fa.camel@us.ibm.com> <32922e07bdf72b25c40b5ab3559a7b75f6e91e0c.camel@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32922e07bdf72b25c40b5ab3559a7b75f6e91e0c.camel@us.ibm.com> X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: Sun, 13 Mar 2022 05:21:42 -0000 Hi Carl, > diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp > index 32435b2b509..38a52b91e9c 100644 > --- a/gdb/testsuite/gdb.base/ending-run.exp > +++ b/gdb/testsuite/gdb.base/ending-run.exp > @@ -202,6 +202,13 @@ gdb_test_multiple "next" "step out of main" { > # This is what happens on system using uClibc. > pass "step out of main" > } > + -re ".*from /lib/powerpc.*$gdb_prompt $" { I really think we should try to match the fact that we were unable to determine the name of the function in the frame information. Wouldn't otherwise the regexp above also match when your system does have the debugging information, incorrectly leading us to stop the testing when we should be able to continue? > + # This case occurs on Powerpc when gdb steps out of main and the > + # needed debug info files are not loaded on the system so gdb can > + # see it stepped to function into __libc_start_call_main. "stepped to function into xxx" seems odd. I'd like to also add an explanation as to why we set program_exited, and in particular why the situation we just detected makes us unable to continue the testing. What about... # This case occurs on Powerpc when gdb steps out of main and the # needed debug info files are not loaded on the system, preventing # GDB to determine which function it reached (__libc_start_call_main). # Ideally, the target system would have the necessary debugging # information, but in its absence, GDB's behavior is as expected. # # Another consequence of this missing information is that GDB # can no longer continue to perform "next" operations, as doing # so requires GDB to know the bounds of the current function. # Not know what the current function it, it cannot determine # its bounds. So we also set program_exited to 1 to indicate # that we need to stop this testcase at this stage of the testing. ? > + pass "step out of main" > + set program_exited 1 > + } > } > > # When we're talking to a program running on a real stand-alone board, > -- > 2.32.0 > > -- Joel