From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rs5PCcIos2AOFgAAWB0awg (envelope-from ) for ; Sun, 30 May 2021 01:55:14 -0400 Received: by simark.ca (Postfix, from userid 112) id 183F71F163; Sun, 30 May 2021 01:55:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 042601E813 for ; Sun, 30 May 2021 01:55:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 50ACB3891C22; Sun, 30 May 2021 05:55:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50ACB3891C22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1622354112; bh=ipJa2tn9vMBJhcTVijFYvRHx6F4wpm+L/WrAnDHvGTw=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ErGIhpdKAJFJKxjyb7T7k+Xs5Y8iDLRF6UbxpJI+z5lAYh6I4M8WQsM9sZHgKUdPr uwP5xj0L7zHlV5MxTtjYLAxC5Sqt0zcXibA1RFQUFliKv73TpvkOLI6J9pOOjf6CcY /6QBXNaO+nTmY4lIXKirKEfcoREstCs2UJkSS6/Q= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 675913848424 for ; Sun, 30 May 2021 05:55:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 675913848424 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33764) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnEPl-0004LY-41; Sun, 30 May 2021 01:55:09 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3692 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnEPj-0007Oo-K8; Sun, 30 May 2021 01:55:09 -0400 Date: Sun, 30 May 2021 08:55:18 +0300 Message-Id: <83v9704vg9.fsf@gnu.org> To: Andrew Burgess In-Reply-To: <5d6ac8c94e5c473d533d945ba9759af2d8ae57a6.1622321523.git.andrew.burgess@embecosm.com> (message from Andrew Burgess on Sat, 29 May 2021 21:57:12 +0100) Subject: Re: [PATCH 3/5] gdb/python: add PendingFrame.level and Frame.level methods References: <5d6ac8c94e5c473d533d945ba9759af2d8ae57a6.1622321523.git.andrew.burgess@embecosm.com> 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: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > From: Andrew Burgess > Date: Sat, 29 May 2021 21:57:12 +0100 > > Add new methods to the PendingFrame and Frame classes to obtain the > stack frame level for each object. > > The use of 'level' as the method name is consistent with the existing > attribute RecordFunctionSegment.level (though this is an attribute > rather than a method). > > For Frame/PendingFrame I went with methods as these classes currently > only use methods, including for simple data like architecture, so I > want to be consistent with this interface. > > gdb/ChangeLog: > > * python/py-frame.c (frapy_level): New function. > (frame_object_methods): Register 'level' method. > * python/py-unwind.c (pending_framepy_level): New function. > (pending_frame_object_methods): Register 'level' method. > > gdb/doc/ChangeLog: > > * python.texi (Unwinding Frames in Python): Mention > PendingFrame.level. > (Frames In Python): Mention Frame.level. > > gdb/testsuite/ChangeLog: > > * gdb.python/py-frame.exp: Add Frame.level tests. > * gdb.python/py-pending-frame-level.c: New file. > * gdb.python/py-pending-frame-level.exp: New file. > * gdb.python/py-pending-frame-level.py: New file. OK for the documentation part. Thanks.