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 D423F3858D37 for ; Tue, 14 Mar 2023 12:59:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D423F3858D37 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 1pc4Fw-0002Bt-EE; Tue, 14 Mar 2023 08:59:56 -0400 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=/7fmLeJ/p5mFoGoT0CfOWZJY7O7F/HE/JPOuxRC/AjY=; b=hSPiraXgt8k5 T3LhI/32ym7o46oAjoGsKiEGr9lgUPSTkPIqZuRcNZYOCswh3ok+KBeAPaIJCeoGO4fBAVettYM9/ WiU32xyjs3QgVhO1dsw3Xy7I/UVz9C3yYQoe002yCUd9AvIYUa37akZc7BkiVgOejsEc/6yvXu1HA Gd+nKJgAQrg8Q14QGFy0tKwh3jbvN7aNRa1G65JOV3t2YXoLxKfATT1ztGYsp4yp4zl0RZqO7Yj7G GKs5ydZhz6yANzgU5rrB6FUqc3Izx/Zq/ju9GN/l55KQGofYSJd6UBZ8VOdKbifYkoMZMoZb5chWH bQV29sBtpBilYdYs+y3UOA==; 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 1pc4Fv-0000ly-Tw; Tue, 14 Mar 2023 08:59:56 -0400 Date: Tue, 14 Mar 2023 14:59:50 +0200 Message-Id: <83lejzsd2x.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <87h6unfxge.fsf@redhat.com> (message from Andrew Burgess on Tue, 14 Mar 2023 10:18:09 +0000) Subject: Re: [PATCH 05/10] gdb/python: add some additional methods to gdb.PendingFrame References: <5bd7327ee61fd1634235cd4ffddbfbc91d392e03.1678460067.git.aburgess@redhat.com> <83y1o4y5nu.fsf@gnu.org> <87h6unfxge.fsf@redhat.com> X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Andrew Burgess > Cc: gdb-patches@sourceware.org > Date: Tue, 14 Mar 2023 10:18:09 +0000 > > Eli Zaretskii writes: > > >> + - 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? > > I did indeed mean a call with no arguments. These would be used like > this: > > class TestUnwinder(Unwinder): > def __init__(self): > super().__init__("Unwinder_Name") > > def __call__(self, pending_frame): > is_valid = pending_frame.is_valid() > name = pending_frame.name() > pc = pending_frame.pc() > language = pending_frame.language() > sal = pending_frame.find_sal() > block = pending_frame.block() > function = pending_frame.function() That's not my point. AFAIU, the text on which I commented documents the methods and what each one of them does. Then the "()" has no place there, since you are naming the methods, not showing how to call them. Right?