From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=lancelotsix.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lancelotsix.com 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lancelotsix.com; s=2021; t=1690558154; bh=NKW6zDiPgKHBd+labowA6GSRgGWmBZPHqIU9p11rSVM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xCJNKHwUYGhbiILe3C8NrkrfGoq7i3RgD2p19go+3PM4QGyry/NcJbB5aPtdeXiFa kO+NrJh/APaN7dY1lMprR3AFTB7arxLTCyh7eScaekaVeaVs1H/286rbSRQi8QYBvy hx7xF7Lbl2cTtsrIvlu4Dt/9V16XArziL9lvuyyTP5584Ra2yVadStsuIJQ3mOYQcG sJTCZzO/9fgaBiVp35LtwgLLlePc+EzY4P6OetZbLYRjW2v+AHayz7gpwlwBmOiduZ CjjkWLeY9t/mxa0oeLkk3MJIzEy1ZqQpquxt4db5nkI4/Si7wQZ7mPyAAn30UX3o7M yNgbQwjaU71zQ== Date: Fri, 28 Jul 2023 16:29:08 +0100 From: Lancelot SIX 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 List-Id: 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.