From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id tRKWBGGTC2klvyMAWB0awg (envelope-from ) for ; Wed, 05 Nov 2025 13:11:45 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=MLXEf6oC; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0017A1E04C; Wed, 05 Nov 2025 13:11:44 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 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 1C0671E04C for ; Wed, 05 Nov 2025 13:11:44 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 31220385C6C2 for ; Wed, 5 Nov 2025 18:11:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31220385C6C2 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=MLXEf6oC Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id A8E9D385B537 for ; Wed, 5 Nov 2025 18:11:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A8E9D385B537 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A8E9D385B537 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762366266; cv=none; b=ANYRYka1Hhu+Fnupt1RXP5sdbBdBjfweCRAONwJoKF4juJSwre/LUxtGo/fT3w2zqLel73qCXgZWOFXzyQ1l2HtCeqbcr4rV6es/1vZDiJeukX0KPKDTAf7D/Mdu7WyXteLBzbk+u6QdB9EcxmTjduTT7KEjbiDXZgY/Uiw97k0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762366266; c=relaxed/simple; bh=5qiMCbVeetnQsvFnsOHRZJ8bQJVYE8mmbhiUPYShKwI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LYzy6Q+hVUKdo3y6rGgtmLE88ulJ1QveB+LBiUVpSPA6kOWyCtIkJMOx1HR0QbFBfABSSyY6jryjwpMRkc2+aRFSx2vUCfp7lqEnfYb5CEdwqDz6m+SCy3WJODggLxdR0CZerGrLYOJ4D4IHpJscWiwg6k7zK3HsGa84YOizGxk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8E9D385B537 Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-4330dfb6ea3so395725ab.0 for ; Wed, 05 Nov 2025 10:11:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1762366265; x=1762971065; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Hpfi0UxeJJAfXGv5yoqCjesPKLsCEGEnneKkuwT9MM0=; b=MLXEf6oCmIutEhJTAZ1FIh92ZMbmn6U3WqggEXfZtitWyzRTSCFTQ2MkxuP4OAAG+w RxgsLpuGQ4RaSMcyXwNGfftuZZDhFFJKuauQg2dRJFhLB9mOiYGSk5EnHBM9zLXGhy1A SXAKZYSuaCdWZszQ6YJs9GKpfgLNQAJsf6Ky/wRh5kDuNbBxzcfQX9DiqA60KS5C6pmd gnVL+D1mxJZlhNrNpqPipiww3AlSO02BCvtJdFkKMu0T6FIXV3Fdj4IrVIcOo4RSBvIo +AKhOalhvLPfAOvFMhu4CBIeiGTDdZj9aRvZRXLwV7Ba+5NoKvb/sSqNnBNOcZ5YJ/f6 9GAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762366265; x=1762971065; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Hpfi0UxeJJAfXGv5yoqCjesPKLsCEGEnneKkuwT9MM0=; b=K60uxJuVm7yHiB3itzk3DUkolQqKR9G6BSAeJslYpsDHySFHcW0pZPYaBGYnFr32Rm t/DjNHhflHXHNsQ9fB36m4Y75ZQ4kKz0IoacFbnh1PLoFvAPOfsF5QOEGcPKobTgeQET UdEpZiaTPFa/0Bx0lKCQsgJtbSLrKH8ZWLBtpEKlINB41kla0e4Ure2Gsx91aZL0+IpZ sE8wz88NHsuEzpNiBj7dzGr2r12O6dwiMqypN2vILopppU0nosQwTwgt5xRwJI5Fq5sZ Kw2CBjmOiaic4n4tYjf86PXX+rU+2a45lflwYYt6we8Bfd32IGye/3ZpNFrgmAU1nbMY K8Pw== X-Gm-Message-State: AOJu0YyAsl/9KMk1UThy9NPxCw5tZSo09CScd7SzEZukzn77BTPGeuEK NKc2wMtJSjlH6ER6EpZPqX1d3kq4YvAhQD0Ds3UxJA++PCVOXnoi3HqQ/wcxa3z/A5OMsHezmYP GTpw= X-Gm-Gg: ASbGnctqzp5MSjMdSznZO8+rQUvBCp7Lp0kmG4BPZpv2k3AVcvmDnL4dwArGt7U6Ui2 +yupuLX6C6LdRyJtUmP3siGoYHDh2O4aGfru2KWMQ73+K0FWO+NQwfPWw+hOmUVZUdCE2W1x/HF iH6oeOW3chDJBq7hdntGhVyg1depCG0fXuD4NInJiND0sroQfJ7EOAQCkpwZSrufs8tymmUQN8x A0iYpmFQEVW/gYPZopQXp0gpKiba5Q6MqUV/owBxjutVgBJKfMtcajeTc1i3KAcTU7W+uufdK+q xiCWBkKiavflh4j0j5KC2FyXigRahaxTfdPBB+/wG9VqU+NfpTHXxbnzqi7Y7/rzkoxBQ60MSib B7sgqdxzco9PbMtOh2hD6kYmEXW8ut2HSk3pNw9vgAeUA58g8fKnoXldNIiiTYZDFAzl9bQ61vg KPUKXJO3TuA/WFOjlYknHzrpDxOcji2SFO X-Google-Smtp-Source: AGHT+IE71uxZlmdmeyMq4v3uCJWVj0K293bJyVi0cgiArXUL80UNS/PpmXXsFW60HPrmHgPXYElQJQ== X-Received: by 2002:a92:ca47:0:b0:433:3487:ea29 with SMTP id e9e14a558f8ab-43340769974mr67152035ab.6.1762366265612; Wed, 05 Nov 2025 10:11:05 -0800 (PST) Received: from bapiya (97-122-120-205.hlrn.qwest.net. [97.122.120.205]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5b7226c2dc3sm2577505173.51.2025.11.05.10.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Nov 2025 10:11:03 -0800 (PST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Minor doc fix for Python Type.fields Date: Wed, 5 Nov 2025 11:10:59 -0700 Message-ID: <20251105181059.3444537-1-tromey@adacore.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This changes the Python Type.fields documentation in a few minor ways: * Documents that a new sequence is always returned I've intentionally not mentioned that it is currently a list, in case we want to change to a tuple someday. * Move the C++ base class note to the bullet about structure types, where it makes more sense. * Added a blank line before the table to make the info page easier to read. --- gdb/doc/python.texi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 13ffde253d3..44a94aa34c9 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -1501,19 +1501,20 @@ The following methods are provided: @defun Type.fields () -Return the fields of this type. The behavior depends on the type code: +Return a new sequence of the fields of this type. The behavior +depends on the type code: @itemize @bullet @item -For structure and union types, this method returns the fields. +For structure and union types, this method returns the fields. The +base types of C@t{++} classes are also represented as fields. @item Enum types have one field per enum constant. @item -Function and method types have one field per parameter. The base types of -C@t{++} classes are also represented as fields. +Function and method types have one field per parameter. @item Array types have one field representing the array's range. @@ -1525,6 +1526,7 @@ is raised. @end itemize Each field is a @code{gdb.Field} object, with some pre-defined attributes: + @table @code @item bitpos This attribute is not available for @code{enum} or @code{static} base-commit: ce106639c2019494833b5a8388d205ba96e7b217 -- 2.51.0