From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8PJ8IjkFmGUaVzMAWB0awg (envelope-from ) for ; Fri, 05 Jan 2024 08:33:45 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=bwZdSpq3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 86E021E0C3; Fri, 5 Jan 2024 08:33:45 -0500 (EST) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 747321E0B9 for ; Fri, 5 Jan 2024 08:33:43 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C7E53857C64 for ; Fri, 5 Jan 2024 13:33:43 +0000 (GMT) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id DBFE23858C29 for ; Fri, 5 Jan 2024 13:33:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DBFE23858C29 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DBFE23858C29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704461605; cv=none; b=sVjN8tP6XBmUJkFkiZU7NLUrp27V3jau6MlvrayUDI/dJNpr3bopRZXLe9DrcSX575mPMnG530CE88ZKzT9yjQa73tBL8vmfXF12ss7P9R0X8z/iStPXuAkdx7p8bbwBh5S6rsxulir3mGb/Pz8ghKn9DJqrg6SO9ptYMonnRlU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704461605; c=relaxed/simple; bh=UNc849uRjdYhg8eDQr5topEMe+FT1s9ChAeLBjvk1/I=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=u9o+I4h0sMtif4PAFnamx3CpDpC01ufP268UBobzmKworDMYANBRULrQH/BAPwGbsrqTyVh57kBukz4SgZ9i/OKk6np5gG8cjJbpyKB4lgtYSboP+o13DnTSz0taIaUDqFdjd8RK6v/40EY2k1rciaFXyaJQCXkpRZAXxh3np+k= ARC-Authentication-Results: i=1; server2.sourceware.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 1rLkKB-0005pF-GS; Fri, 05 Jan 2024 08:33:23 -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=7F7nmpXPdp2KlFPdkfZD5F9CESL8zS0Al5gZFxdsMMA=; b=bwZdSpq3se3K Da70h6TL2WCJkIiUeQul9RmjtKu3Gj+LOPHsuH+1F2UgKSTXtLgJTVjaBLmB/+83L3sA+zG3opJ93 pB1n2vUUrDcu28JKNwx0WQqkURCulTDJ1YS5Rd+Y0ocaePJjuQqoKVIgsliY4Wz2vjgqTvxj4+yZL 1Bwt6isTQLqtxhxUQBzfENawGI6iEDYBRB9dSkdoixqaUPF/XUtQY1Q396HOlFFb+b0PYldlR7HxC Ij3qp4ubBJ/RviyRUnMuwFtGkJwvY0Kyd/ARcpltXFKMhFWOVHFeDcZctRIYOQExxYBWbj6D29qb4 0o71f2Hc2J+y8KAa8VHIwg==; Date: Fri, 05 Jan 2024 15:33:11 +0200 Message-Id: <83il47vrag.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <6eb215cd5252a70326d1ec5bd9c7d96e9a6d20e5.1704455158.git.aburgess@redhat.com> (message from Andrew Burgess on Fri, 5 Jan 2024 11:48:34 +0000) Subject: Re: [PATCH 5/6] gdb/python: Add gdb.Inferior.__dict__ attribute References: <6eb215cd5252a70326d1ec5bd9c7d96e9a6d20e5.1704455158.git.aburgess@redhat.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org > From: Andrew Burgess > Cc: Andrew Burgess > Date: Fri, 5 Jan 2024 11:48:34 +0000 > > The gdb.Objfile, gdb.Progspace, and gdb.Type Python types already have > a __dict__ attribute, which allows users to create user defined > attributes within the objects. This is useful if the user wants to > cache information within an object. > > This commit adds the same functionality to the gdb.Inferior type. > > After this commit there is a new gdb.Inferior.__dict__ attribute, > which is a dictionary. A user can, for example, do this: > > (gdb) pi > >>> i = gdb.selected_inferior() > >>> i._user_attribute = 123 > >>> i._user_attribute > 123 > >>> > > There's a new test included. > --- > gdb/NEWS | 4 +++ > gdb/doc/python.texi | 32 ++++++++++++++++++++++++ > gdb/python/py-inferior.c | 13 +++++++++- > gdb/testsuite/gdb.python/py-inferior.exp | 19 ++++++++++++++ > 4 files changed, 67 insertions(+), 1 deletion(-) Is this patch different from the 6/6 one? if so, how? In any case, my comments are the same as in 6/6, thanks. Reviewed-By: Eli Zaretskii