From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id D0F673858D38 for ; Fri, 10 Mar 2023 15:42:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0F673858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paet4-0007tn-0d; Fri, 10 Mar 2023 10:42:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oSOEWhxKmE/L7yCPX7EYbjw2252xCJIB7bxBXfh0yMU=; b=J9G8CEIJJRMM QQ8CKkfyEXrlbbp82AE2SuEXJzDVWAgwIsyoctOWHyzmnxHtROHhF/3uYL+O/jzT21xdY3sYttCcD GCjktCUa6Iwp2FoIue+FIieBtPbNYf4lt1+rNx0QKtFTsNXKJhryxbHiXXtC2egabbIT+zVwkfgd9 S6iAAPvsAch/zcfkOfvy4WBsMBaSybkZE8TdUmvn4wuszacAAdeM8h9UOjWnAzibiimcbWN3H+5+u s5SFZI2HjYEG4hCdyvDHMj4mex1IupKH/dtGcgy5ctHA3lMl6GPdEh15vV1FiUl8Uueqi/084MYPR 0Lm07RvPdngXKaChkDqqUA==; Received: from [87.69.77.57] (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 1paet3-0007ZT-6U; Fri, 10 Mar 2023 10:42:29 -0500 Date: Fri, 10 Mar 2023 17:42:13 +0200 Message-Id: <83y1o4y5nu.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <5bd7327ee61fd1634235cd4ffddbfbc91d392e03.1678460067.git.aburgess@redhat.com> (message from Andrew Burgess via Gdb-patches on Fri, 10 Mar 2023 14:55:22 +0000) Subject: Re: [PATCH 05/10] gdb/python: add some additional methods to gdb.PendingFrame References: <5bd7327ee61fd1634235cd4ffddbfbc91d392e03.1678460067.git.aburgess@redhat.com> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,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 List-Id: > Cc: Andrew Burgess > Date: Fri, 10 Mar 2023 14:55:22 +0000 > From: Andrew Burgess via Gdb-patches > > gdb/NEWS | 20 +++ > gdb/doc/python.texi | 40 +++++ > gdb/python/py-unwind.c | 221 +++++++++++++++++++++++++ > gdb/testsuite/gdb.python/py-unwind.exp | 33 +++- > gdb/testsuite/gdb.python/py-unwind.py | 104 ++++++++++++ > 5 files changed, 417 insertions(+), 1 deletion(-) Thanks. > diff --git a/gdb/NEWS b/gdb/NEWS > index ed0f86e79ec..0d9049ff134 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -110,6 +110,26 @@ show always-read-ctf > without the particular unwinder, depending on how 'enabled' was > changed. > > + ** New methods added to the gdb.PendingFrame class. These methods > + have the same behaviour as the corresponding methods on > + gdb.Frame. The new methods are: > + > + - gdb.PendingFrame.name(): Return the name for the frame's > + function, or None. > + - gdb.PendingFrame.is_valid(): Return True if the pending frame > + object is valid. > + - gdb.PendingFrame.pc(): Return the $pc register value for this > + frame. > + - gdb.PendingFrame.language(): Return a string containing the > + language for this frame, or None. "containing the language"? I think this is better: Return the language of this frame, as a string, or None. > + - gdb.PendingFrame.find_sal(): Return a gdb.Symtab_and_line > + object for the current location within the pending frame, or > + None. > + - gdb.PendingFrame.block(): Return a gdb.Block for the current > + pending frame, or None. > + - gdb.PendingFrame.function(): Return a gdb.Symbol for the > + current pending frame, or None. Btw, why do you follow each method name with a "()"? That looks like a call with no arguments, which is not what you mean, right? Reviewed-By: Eli Zaretskii