From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GTtXD/0dcGooOgEAWB0awg (envelope-from ) for ; Mon, 03 Aug 2026 00:50:05 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=yKfNY/Op; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3B4F41E09E; Mon, 03 Aug 2026 00:50:05 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 autolearn=unavailable autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 D513F1E033 for ; Mon, 03 Aug 2026 00:50:04 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6C48D4BB1C06 for ; Mon, 3 Aug 2026 04:50:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C48D4BB1C06 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=yKfNY/Op Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by sourceware.org (Postfix) with ESMTPS id 800014BAE7FB for ; Mon, 3 Aug 2026 04:49:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 800014BAE7FB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 800014BAE7FB Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1129 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785732579; cv=none; b=I3msBu5lch/zPYPVzllQTi5lH8XC7RTLlQdje8lM1gJWnsouTp8RqxMN/4zXhLpSSdVuXot+7frxJQxw5UPW+AeHEFSz/edSIwaUzSTUIZ4J0LlCSiJQ9c8ENKbAAjYjt8lZ0CYXw7ECLXVvRnnWyiSjnuaYfFeSuo96b/0Hhds= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785732579; c=relaxed/simple; bh=FewmVL95vbq6A4B+C07LG15NX73najCZHJMGkr4FeIE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=e1+jXj4KkcIrXxic06Ip2LGH1MwdaGUe9WTMqdt7eFpyyVDW9bTfUfISq9BFfE4wF0MEQ7biZraToG1Dkosm2na2tpGVmuMcBGK1XoAsPVSwRrhyPMw71KUK8deacWv2z+gK4zgkJ1+219oHqKu/gKxt3SU3CPLOeFq+ftrk38s= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=yKfNY/Op DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 800014BAE7FB Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-81ed073fed0so42718757b3.0 for ; Sun, 02 Aug 2026 21:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785732579; x=1786337379; darn=sourceware.org; h=content-type:mime-version:message-id:date:user-agent:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=lyLIRDZ+VZv6jPkEP5qS3OX/N9BFQuA+U6xOp3t3a+g=; b=yKfNY/Opizg987g5vXUZ6u1rkAu3dBXARKWxqjiNiLrLCCHcTPmLlTYwycZwlB2Uyp iunqzc+2QVZ6eCwneKgFN/eR4TFAF2f+70gm/sAoGEQuTFh3vnV4IjKBz6TvsHq8ErjD ygsQScGnx2wP7j3LzaMYaDzL5DHO+uvsL5K2ExTy5mQ8EkhRS0IIRBREOl4jObH00wkI 0M/XXqTzHm4LgWQuZ+D/arvW/7RnBarbGTUDmPDU1PbHOiz7fY8czY0GBPpfJeMjqP9c fRf5+EfYGb1luxew4s8DNubdg3oC+09Tz0SjSJjVlbpXQfftta1tqDWMh+OSPR1sXSCN WkxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785732579; x=1786337379; h=content-type:mime-version:message-id:date:user-agent:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=lyLIRDZ+VZv6jPkEP5qS3OX/N9BFQuA+U6xOp3t3a+g=; b=BC6F0sdEhJ5C75B/JXK5OaeaH/qylEuohbDiTdRGTREXdppz2vjbuY6i3JPwmWumUs TixovXyHc9FvT38Grv9Vd0oejPtwKkrWKbAGCdvw9ijXi+F50BJBOepCVeKF5d56WjnM trec2BWznAJqI247Z3soag0u8+XX1q7t2el5DTyWMAI96Y/cV8EgftYDYO1oXiTyUM5g AmdFg9Fz+vTXMUBhuyW2IjWQXtUUt3yIfk3pASYvwKHjtcLR7D+y8+aefwBighF1F8mH 6S95i6bxiEQBYT3N7hIZHjN37CZIx8XFJTq4RdY7xcsqh6FG9odD+3GqTZEVBpsX584h 6zbw== X-Gm-Message-State: AOJu0Ywens06kxm0cwujndUDkP4Fnv6s10SeNwVtusi7Zw1OymtqXnRI Ru1HAG7wWPGtc6JsbawAkU1te48rPYxq7eNLbNWWCm0fWz0PoAwo4Q+DGfZoDk9VsXU= X-Gm-Gg: AR+sD112HI0L+PvYQkvZg/XQC56lCOhCjBP/BGcJxoLioG3IegUrmkvB0bG6YLR9KTx ZiDLxVyx/iRchfg9lQcLnzahRL7ygWfvx4v+j3qslk4qXQBmBqTzWpuzqQqXMJz1BgUKXwYt+xG +EBvNeXAE1md175/5dUzG847itYrfXqazdIw6HfCxgxiIF5jAT6ayHuJkQD3THl0NMIm0k6ZROr vcMEF/J1z5elce6SIx0T9StyXzC+fwWcTfpkG+S3cQ3RlMwhkar3ncmrQmtBqVd3+YcznNvNbu8 zJQPfW5bydLclahKcqnzyAwlVyT2IGPBajhQN54YXw5bOjOewpFz4bH1UKSzB8U+HyenZZ0cTTL uA0BpPJxR7jhCnO6Csc/MT0RYTFNUfqMuA6fM03hB0QnRbopWVm4yHMBI8XV9s81niBJzqPgKY2 JGpDMJ6O5heSfQkpx3sbwvt+JSenkuO0aJ2goplzPsZb3tXhOgk3bP/2PsuA5yTCPotsJI/xYfR pvNoKTJDw== X-Received: by 2002:a05:690c:c511:b0:804:a2d5:1d32 with SMTP id 00721157ae682-81fd4c40b5fmr117371597b3.36.1785732578907; Sun, 02 Aug 2026 21:49:38 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 00721157ae682-81fcd0d6fcasm49162097b3.29.2026.08.02.21.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2026 21:49:38 -0700 (PDT) From: Thiago Jung Bauermann To: Matthieu Longo Cc: , Luis Machado , Luis Machado , Simon Marchi , "Kevin Buettner" , Christina Schimpe , Christina Joos Subject: Re: [PATCH v1 1/6] target_fileio_read_stralloc: add an optional length parameter In-Reply-To: <20260728151700.253720-2-matthieu.longo@arm.com> (Matthieu Longo's message of "Tue, 28 Jul 2026 16:16:55 +0100") References: <20260728151700.253720-1-matthieu.longo@arm.com> <20260728151700.253720-2-matthieu.longo@arm.com> User-Agent: mu4e 1.14.2; emacs 30.2 Date: Mon, 03 Aug 2026 04:49:35 +0000 Message-ID: <87pkzz3j1c.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain 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 Matthieu Longo writes: > Extend target_fileio_read_stralloc with an optional output parameter > that returns the number of bytes read, excluding the terminating NUL > byte. > > Most callers only need the returned NUL-terminated buffer and can > ignore the new parameter, but callers that need the number of bytes > read can now obtain it without recomputing it. > > While updating the function, make a couple of minor cleanups by using > '\0' instead of 0 for character literals and clarifying the function > documentation. > --- > gdb/target.c | 11 ++++++++--- > gdb/target.h | 20 ++++++++++++-------- > 2 files changed, 20 insertions(+), 11 deletions(-) Reviewed-by: Thiago Jung Bauermann -- Thiago (he/him)