From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by sourceware.org (Postfix) with ESMTPS id 8ECB73858404 for ; Thu, 13 Oct 2022 13:41:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8ECB73858404 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f54.google.com with SMTP id i10-20020a1c3b0a000000b003c6c154d528so28110wma.4 for ; Thu, 13 Oct 2022 06:41:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FSNVgv5wuuLDke0TmcHq99YYwCsrYFv3pcPN04L26Rg=; b=2NhdzeTVGe7hJd+FpLvp8gK1ZIgw4OYIaNBTzE36e4zhY0bxq6SMPIDc4Ljd6NEp+R 1qNBluvu/FtKKO8J1Fak/FJCkpEFSsnZNokFjIiDHDb3c9+uSjp1aVJX5mlFV3dkq/TZ ZFCm3cu0QflpMbZOvQ1aoD7dYNxZm3PlxZBeWf9y+MffN4MgS3cKNLqlJ38BQd0iEhTy fLauM62cqE+WFy/IXhqNEdwUUGTZkFI87iSiAf9ng3esyc+g4v2WyPbutAV/mNZf1NmA rV3FxYYBkZDV+x8zfRf9CarlbtTXqXb04hi4x3j0kxVwEjLxMOftP9ht+Tv3K40QAmUN vESg== X-Gm-Message-State: ACrzQf3lpOicP2uVdX/0vXLoYq3+0ZV8i8khzFcoazO8HEEB3IEKfE9+ 2qchM1j0O/irNBt82mvWYBGFurZ1XRSKuA== X-Google-Smtp-Source: AMsMyM7TLnKjW0t3rlEvWpeTeipZBad5rMp0wisvktfi2hSwI+15YnHP5ZOiCbvRz9B8xQPNuNWscQ== X-Received: by 2002:a7b:cd15:0:b0:3c5:1b4c:7632 with SMTP id f21-20020a7bcd15000000b003c51b4c7632mr6791176wmj.2.1665668480878; Thu, 13 Oct 2022 06:41:20 -0700 (PDT) Received: from ?IPv6:2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653? ([2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653]) by smtp.gmail.com with ESMTPSA id a2-20020a056000050200b00226dfac0149sm2025600wrf.114.2022.10.13.06.41.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Oct 2022 06:41:19 -0700 (PDT) Subject: Re: [PATCH v2] gdb/arm: Stop unwinding on error, but do not assert To: Luis Machado , =?UTF-8?Q?Torbj=c3=b6rn_SVENSSON?= , gdb-patches@sourceware.org References: <20221013091740.645783-1-torbjorn.svensson@foss.st.com> <9cc66b68-94b4-ed24-f4b5-93a441b8a70d@palves.net> <94af9e31-5092-1b6d-8520-d58c13d02631@arm.com> From: Pedro Alves Message-ID: Date: Thu, 13 Oct 2022 14:41:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <94af9e31-5092-1b6d-8520-d58c13d02631@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, BODY_8BITS, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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: Thu, 13 Oct 2022 13:41:25 -0000 On 2022-10-13 2:11 p.m., Luis Machado wrote: > On 10/13/22 12:21, Pedro Alves wrote: >> On 2022-10-13 10:17 a.m., Torbjörn SVENSSON via Gdb-patches wrote: >> >>> +  /* Unwind of this frame is not possible.  Return outer_frame_id to stop the >>> +     unwinding.  */ >>> +  if (cache == NULL) >>> +    { >>> +      *this_id = outer_frame_id; >>> +      return; >>> +    } >> >> Please let's not add more uses of outer_frame_id if we can avoid it.  We're getting >> close to eliminating it.  Can a cache object still be returned, and then a frame id >> be successfully computed? > > Sorry, is that deprecation of outer_frame_id documented somewhere? I haven't seen any warnings or > comments stating it is not supposed to be used. It's not strictly deprecated, but it's better to avoid abusing it for cases it isn't meant for, and fill in the frame id with the best info possible. The frame in question is not an outer frame, it has a frame address. We just happened to fail to unwind from it. > > It was even made more explicit with this commit: > > commit 84154d166a1a4592c70e2a8296d5df0ad7f89be9 > Author: Simon Marchi > Date:   Mon Aug 31 13:23:12 2020 -0400 > >     gdb: introduce explicit outer frame id kind > That actually removed explicit uses of outer_frame_id. The explicit FID_STACK_OUTER id kind is only used for the debug prints, as mentioned in the commit log. The following patch removed even more explicit checks for outer_frame_id: commit 22b9b4b05bfad806eb3d16535dcd4dbedb028c40 Author: Scott Linder AuthorDate: Mon Aug 31 13:24:20 2020 -0400 Commit: Simon Marchi CommitDate: Mon Aug 31 13:25:05 2020 -0400 gdb: support frames inlined into the outer frame > > So this is a bit confusing. >