From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +d+QHmHB+GlRARMAWB0awg (envelope-from ) for ; Mon, 04 May 2026 11:55:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777910113; bh=b++kHVbvTDsLtZyZ4D6r00GfvczHD8yv0RIfHuqBk4Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sWynjWFBli9FblDx6vjTdePjD5ovBF/qGh502W56/HFip/PIthSQoH8DZNWn+myEw ydGrD1SVq9/G8Z5jOtL7RVo8ZU4tggVIY7IzPEnASal2oE/eQawGtjkY1OLLRG1FHP XO0NY3HV5QfTL+7u2Ug1zK2Ap4cYpMXMHx/lhlVI= Received: by simark.ca (Postfix, from userid 112) id 767D81E067; Mon, 04 May 2026 11:55:13 -0400 (EDT) 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 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=HegRKcbd; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 C869E1E067 for ; Mon, 04 May 2026 11:55:12 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 4CAA74B9DB64 for ; Mon, 4 May 2026 15:55:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CAA74B9DB64 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=HegRKcbd Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 333F64BAD15A for ; Mon, 4 May 2026 15:52:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 333F64BAD15A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 333F64BAD15A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777909975; cv=none; b=n4ZNj5NlwJM85IMl+GcQzW/coxkGjKIlx7Izjt65QeaGH1pLGMfsUUX9r31t4FmPeT1C1TNeNSECVakZU12AqK3W92W86jhhF7hgUa3NyhLnlGywiAvL6xDqJiGlCnAekHq8RNF0tj80hxMizuOJsBfZfSb2BN0CODV4bOdzP8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777909975; c=relaxed/simple; bh=b++kHVbvTDsLtZyZ4D6r00GfvczHD8yv0RIfHuqBk4Y=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=L7k3b08daRBm/+l+HPukpTbT25kVcMosd+IQ7fSMMGXDBsosykX+EV5q7MrNxpXjBqCpzYOBG+iv6GPjgoKf/wk+YpMDclzov6v/lfzqH6dReTCaaoWjfxO/3/kDXuWLPHy57IadhWRs15zf6VZH3ojhqQGVGB+/OxO37JBKNoo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 333F64BAD15A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777909974; bh=b++kHVbvTDsLtZyZ4D6r00GfvczHD8yv0RIfHuqBk4Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HegRKcbdbfDGg/I8am1TTlGf/KNJ5jO5UCFKAjpncCxLH0fNY0PAsT2wTS2WBFqNk IIp/aKLym5lZWFwQX0voav4X7tJHwkejxh9umIbmMy7ZjnPEy7ms2UNfE9vwIFH/N2 wgnBwN7bGkswe+t+lalhlCS3y1klmqrMGQCKLJDY= Received: by simark.ca (Postfix) id 03BAE1E067; Mon, 04 May 2026 11:52:54 -0400 (EDT) Message-ID: Date: Mon, 4 May 2026 11:52:53 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: update store_integer's comment To: Markus Metzger , gdb-patches@sourceware.org Cc: Tankut Baris Aktemur References: <20260504071636.1571615-1-markus.t.metzger@intel.com> <20260504071636.1571615-5-markus.t.metzger@intel.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260504071636.1571615-5-markus.t.metzger@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 5/4/26 3:16 AM, Markus Metzger wrote: > From: Tankut Baris Aktemur > > The comment of store_integer seems slightly outdated and does not > refer to the variants that take an array view. Update the comment. > --- > gdb/extract-store-integer.c | 4 ++-- > gdb/extract-store-integer.h | 3 ++- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/gdb/extract-store-integer.c b/gdb/extract-store-integer.c > index a7bce99362d..66ddae33aa8 100644 > --- a/gdb/extract-store-integer.c > +++ b/gdb/extract-store-integer.c > @@ -129,8 +129,8 @@ extract_typed_address (const gdb_byte *buf, struct type *type) > return gdbarch_pointer_to_address (type->arch (), type, buf); > } > > -/* All 'store' functions accept a host-format integer and store a > - target-format integer at ADDR which is LEN bytes long. */ > +/* Take a host-format integer VAL and store it as a target-format > + integer at DST. */ > template > void > store_integer (gdb::array_view dst, enum bfd_endian byte_order, This one should be "See extract-store-integer.h.", since we have a declaration for this in the header. > diff --git a/gdb/extract-store-integer.h b/gdb/extract-store-integer.h > index 76dfd49d62a..16a6a852bf7 100644 > --- a/gdb/extract-store-integer.h > +++ b/gdb/extract-store-integer.h > @@ -57,7 +57,8 @@ extern CORE_ADDR extract_typed_address (const gdb_byte *buf, > struct type *type); > > /* All 'store' functions accept a host-format integer and store a > - target-format integer at ADDR which is LEN bytes long. */ > + target-format integer, either at DST, which contains its size, > + or at ADDR, which is LEN bytes long. */ Since it's a short and simple comment, my preference would be to put a specific comment on all the variants. This makes the comments more useful, especially when you hover over a function call in an IDE. Simon