From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id vQUlCeTew2Q6rDEAWB0awg (envelope-from ) for ; Fri, 28 Jul 2023 11:29:40 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=LBmyN6nb; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1C8BC1E0C0; Fri, 28 Jul 2023 11:29:40 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.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 F25141E092 for ; Fri, 28 Jul 2023 11:29:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C07A33856263 for ; Fri, 28 Jul 2023 15:29:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C07A33856263 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690558176; bh=8iHGDWUwF6ZYrbn41c7nPXBGEdLPVudD3uP7j1JFK74=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=LBmyN6nbj+3DCZu2fhcFM9TDzPfUHxkEUzA6zBTdrAyOy+ZPjyyPF9zf3h0b0W1w7 p1ayEeioU5SxqNnqcGp208XaiSFCu/Bbv3SR6JhzMWOEDXFvCzJfE/eXKoibg+N+gv 8qisiQZDLUFNyvZRd2vfPh2oQAxSgvAlshCJPufA= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 7A24B3858D20 for ; Fri, 28 Jul 2023 15:29:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A24B3858D20 Received: from octopus (unknown [IPv6:2a02:390:9086:0:b3e:5391:ee4d:d371]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 58F5D80910; Fri, 28 Jul 2023 15:29:14 +0000 (UTC) Date: Fri, 28 Jul 2023 16:29:08 +0100 To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 4/6] Full paths in DAP stackTrace responses Message-ID: <20230728151539.qnrgzb37fub34tke@octopus> References: <20230725-dap-bt-path-v1-0-bb015b0d8e54@adacore.com> <20230725-dap-bt-path-v1-4-bb015b0d8e54@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725-dap-bt-path-v1-4-bb015b0d8e54@adacore.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (lndn.lancelotsix.com [0.0.0.0]); Fri, 28 Jul 2023 15:29:14 +0000 (UTC) X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, 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: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Tom, > +class FrameDecorator(_FrameDecoratorBase): > + """Basic implementation of a Frame Decorator""" > + I can see that this pre-existed your patch, but is it expected to have two docstrings instead of one with empty lines to separate paragraphs? > + """ This base frame decorator decorates a frame or another frame > + decorator, and provides convenience methods. If this object is > + wrapping a frame decorator, defer to that wrapped object's method > + if it has one. This allows for frame decorators that have > + sub-classed FrameDecorator object, but also wrap other frame > + decorators on the same frame to correctly execute. > + > @@ -172,7 +172,11 @@ def _frame_iterator(frame, frame_low, frame_high, always): > > # Apply a basic frame decorator to all gdb.Frames. This unifies > # the interface. > - frame_iterator = map(FrameDecorator, frame_iterator) > + if always: > + decorator = DAPFrameDecorator > + else: > + decorator = FrameDecorator > + frame_iterator = map(decorator, frame_iterator) The purpose of always (always return an iterator) seems orthogonal to the way `filename()` behaves. I find this confusing. Should the parameter be renamed / a new parameter added? Best, Lancelot.