From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 703273858D1E for ; Tue, 21 May 2024 11:48:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 703273858D1E 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 703273858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716292109; cv=none; b=Ef49hmlos0JkTTTtkBR7Zh3FL/Qbh5fKCGlQCWMjxA9gtK24k7NHtZccYTHyxIw4N+fHrUr1TTsoRviKZG+x7KwVs9X6GJbnTr5XSpRu26dwcTD1h+52+wE2ARsSMQpLdqtyhN0qMLVtGSM9BTH0l9ggu7JVTQjLBHAEaj4O6CM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716292109; c=relaxed/simple; bh=DVlkyM8v5S31D38vvN0u0x3ViOh2hYrCxkTPUhs3/o0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=U2xQYsHuy3MTgHvNMg5m1sruG8qWvCmoV0ztwgW83saYCl18yDCjQohYAy0U3t48jNzkoEu1G/3IEEQ7rKGs3zKD0Dtv4eaxPvUh6hPSm3UoRnnMyaEPWLN/vCWUWAJazp6BcWyz2RKJR0+EeOSWEmZ570EcL/tzUOFe8XWtA/8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4202ca70289so29348445e9.1 for ; Tue, 21 May 2024 04:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1716292097; x=1716896897; darn=sourceware.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XJFSPpsSS/For8TCQ2I3U8b1YCrx+lFGg5DIO65SL8g=; b=E2CnMFW1xj8ktYUSW37IsBoq9dN4RCMKlCrpeUbL1/27QwSyvji5j1RnHBa8B2ISSm a/rbzrB1lE2exxleuxXz8nvywS14sGwELLvAy4f8BRHL71nyxEk4NJS1CldCPYJxqS2U aVT2mBNinQRF6+7AgIEI0/EOy9V5Zf97gcUFOsXeN3hmKTajtsu2eHV8Xj92txBX/D73 zMWLune6Y3WlygILX+OMeWUUAbmV6uOCu3IGZBdfEZLNmMwjBuZcWmnQ4YWvUV4u18m2 25Yr8X6fn4qx6XLdJYbGaGffr/8tafD2cMrVT2Hpoy5fnClmtAGsL0+wOCapp6NxtGbl 4I1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716292097; x=1716896897; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XJFSPpsSS/For8TCQ2I3U8b1YCrx+lFGg5DIO65SL8g=; b=Q3frpKwLqtTLhKCUJXLG8eYRTDC41E57qxrDPJR0c9Sw/3HKOD9O2gdsCoHCKYX5/p 2TyYq+MtxmrruLkN0URZrZjki34irrmoUS2snJ981TvOH4YIA2bxNC+5eNXlMy/yDNol NU3HJSEBr8VvHWeANac9QrteDNlqS1nYGp4woMOB7DARxRsUDkLEk45nv+1q4NpPMesw aL9nK0uUxw7hBzMzc6T/15D9ldMMKaZ3GwUAxyPHWEgyT+XqAjbOyLdRRCQZelGOeOEr oouj1LxsJa00nRj+1CT4YT/7a4tIFl/TcE2lzmY9bAD2fFpodfqI80tL7bGBLcwjKzqE zrUw== X-Gm-Message-State: AOJu0YydoC2RjT3nRBT8qhoItiJ3Qlnn9ZKhfe9z86ROoT4w0ZBKZER1 4P4LM5rpvcS2D/FlyDt+bOtWbm3D0HKT7OeYoVusuTrY5Tonj0lkLyqfg6mUO0jl7ll9swg30UY = X-Google-Smtp-Source: AGHT+IGykJhqiwuT7FPFj3bhJQm06pYwy5wV0pbIXcqnOvoaVGkor5m3hORKUfdc4af39wiKJUHudg== X-Received: by 2002:a05:600c:4f93:b0:418:ee2:5911 with SMTP id 5b1f17b1804b1-41feac55f8amr234982375e9.28.1716292096910; Tue, 21 May 2024 04:48:16 -0700 (PDT) Received: from legouguec-Precision-7550 ([2.57.72.67]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm32143183f8f.70.2024.05.21.04.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 04:48:16 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Clarify documentation for pretty_printer.child In-Reply-To: <20240521111728.928069-1-tromey@adacore.com> (Tom Tromey's message of "Tue, 21 May 2024 05:17:28 -0600") References: <20240521111728.928069-1-tromey@adacore.com> Date: Tue, 21 May 2024 13:48:15 +0200 Message-ID: <87frubo074.fsf@adacore.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: Tom Tromey writes: > An Ada pretty-printer had a bug where its 'child' method returned a > gdb.Value rather than a tuple. K=C3=A9vin suggested that the documentati= on > for this method could be improved to clarify this. > --- > gdb/doc/python.texi | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi > index 4ca3ae4eca4..86ccc140c6d 100644 > --- a/gdb/doc/python.texi > +++ b/gdb/doc/python.texi > @@ -1869,8 +1869,9 @@ If available, this method should return the number = of children. > This is not a basic method, so @value{GDBN} will only ever call it for > objects derived from @code{gdb.ValuePrinter}. >=20=20 > -If available, this method should return the child value indicated by > -@var{n}. Indices start at zero. > +If available, this method should return the child item (that is, a > +tuple holding the name and value of this child) indicated by @var{n}. > +Indices start at zero. > @end defun >=20=20 > @value{GDBN} provides a function which can be used to look up the Thanks, I think that clear things up pretty well! Reviewed-By: K=C3=A9vin Le Gouguec