From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RiIrMl0V+mmZ+hYAWB0awg (envelope-from ) for ; Tue, 05 May 2026 12:05:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777997149; bh=gnu27db8f1aNchYyOEbbUZ2PwzllmrZ0Azra2Gfnm0o=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HtmLIXgQMBwsSE7l0cL6fc8f3FDuaMYwxxBYOE5CtYSLBBg/GcBfY+zx0dufUD2si X4jGW1yFawAZRIrtFNbkrGNw91wMoB0a62pY22CIz3ayqGO+23RaecoupA9XhhCXK7 mnbR4H9tCL4mc/S8OCsuX3QEk+GUSeAqVAkwGkkc= Received: by simark.ca (Postfix, from userid 112) id BA4411E0BA; Tue, 05 May 2026 12:05:49 -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=SZVVh6mj; 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 1CCDA1E067 for ; Tue, 05 May 2026 12:05:49 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D50E64BA79A1 for ; Tue, 5 May 2026 16:05:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D50E64BA79A1 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=SZVVh6mj Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 20E0F4BA2E3F for ; Tue, 5 May 2026 16:05:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20E0F4BA2E3F 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 20E0F4BA2E3F 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=1777997115; cv=none; b=LhgNiOOpDgrisSV5z8s5H4dn3C/klrCWHqD3Dl0+S7BVsAPJC7ocOeNtZ5kmbsN3C+WLvKLr/r+pMt/eJbVsYMXlcVSXtUJaNsTUfAe+Gygov3pin3TN47+zaPM1rCmIrt4+qbVp3SmtGv92Jt4peBgy4ZUvF9Hio1AUe0cGQsw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777997115; c=relaxed/simple; bh=gnu27db8f1aNchYyOEbbUZ2PwzllmrZ0Azra2Gfnm0o=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=F2oguCOYSboZXyEAofjPsYup5b+Kc2SiMwqvp23gxZCNp+UCzTWROX0OqSPcgBbpwhH7Jnn41eG58omGIzKGcHs0aJSRoBqQUwrTBDirYhlr8o6Ze9eEraLFK7F1/v0DHbEK6XY8G5nLnzqe+xEviJLvpeYiIO3JONPz3VaHWoA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20E0F4BA2E3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777997113; bh=gnu27db8f1aNchYyOEbbUZ2PwzllmrZ0Azra2Gfnm0o=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SZVVh6mj4UXYUcMSDQa4IxljlNAL1NSdP6Xg4e1zBAb1CZfcYdYkfaYjEvkgp2Ex7 yy/1Q1wbc25SNhesbbLbeD2kwB16QWuMqT7/XghUNm45ShnlpPs0ghteUdFs/Mifwd o29gfQx9Lb0afdhh2oAZuvOaY/CvPlcfVFN4o77g= Received: by simark.ca (Postfix) id A9ECC1E067; Tue, 05 May 2026 12:05:08 -0400 (EDT) Message-ID: <96e73d5c-c425-4a25-8a35-ca7e5946b544@simark.ca> Date: Tue, 5 May 2026 12:05:08 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] gdb: update store_integer's comment To: Markus Metzger , gdb-patches@sourceware.org Cc: Tankut Baris Aktemur References: <20260505063809.1821415-1-markus.t.metzger@intel.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <20260505063809.1821415-1-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 2026-05-05 02:38, 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. > > CC: Simon Marchi > --- > gdb/extract-store-integer.c | 3 +-- > gdb/extract-store-integer.h | 15 ++++++++++++++- > 2 files changed, 15 insertions(+), 3 deletions(-) > > diff --git a/gdb/extract-store-integer.c b/gdb/extract-store-integer.c > index a7bce99362d..6749c46fb6b 100644 > --- a/gdb/extract-store-integer.c > +++ b/gdb/extract-store-integer.c > @@ -129,8 +129,7 @@ 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. */ > +/* See extract-store-integer.h. */ > template > void > store_integer (gdb::array_view dst, enum bfd_endian byte_order, > diff --git a/gdb/extract-store-integer.h b/gdb/extract-store-integer.h > index 76dfd49d62a..49799bb0953 100644 > --- a/gdb/extract-store-integer.h > +++ b/gdb/extract-store-integer.h > @@ -57,12 +57,17 @@ 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. */ I'd remove this "All ..." comment, the comment on each function is clear enough. > > +/* Take a host-format integer VAL and store it as a target-format > + integer at DST. */ I'd use a definite form ("Take host-format integer VAL..." or "Take the host-format integer VAL..."). We don't take about any integer, we talk about VAL specifically. Add an empty line between comments and functions. With those fixed: Approved-By: Simon Marchi Simon