From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id E8DAF3858C62 for ; Thu, 2 Mar 2023 22:04:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E8DAF3858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 8DAA41201F3; Thu, 2 Mar 2023 23:04:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1677794676; bh=ntY1HitF77eIvTp3L5Eekmc/x9yDF1ibDFbyWbKUEmw=; h=From:To:Subject; b=kfGuU+Bxna4b+/0vYhh6YOYwnIdRzC2Zzob4EpTMEdfLF5Lq57a95EfNbgMaXQwYG iNqNVt7MIWQ02jFPT0E4z7CIAFmXPfxNaehXT9QDaaTEwHdRGHHXs+8Jil/aqFq+QE RusmIN8YFEVtT3NyUptK5k0vQ3QPKg7/X4VTU2l8= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: binutils@emagii.com To: binutils@sourceware.org Cc: nickc@redhat.com, Tom Tromey , Bruno Larsen Subject: [PATCH v9 10/11] Fix btrace regression Date: Thu, 2 Mar 2023 23:04:07 +0100 Message-Id: <20230302220408.1925678-11-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167779467686.1167769.17566891087244466437@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_FAIL,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: From: Tom Tromey Tom de Vries pointed out that my earlier patch: commit 873a185be258ad2552b9579005852815b4da5baf Date: Fri Dec 16 07:56:57 2022 -0700 Don't use struct buffer in handle_qxfer_btrace regressed gdb.btrace/reconnect.exp. I didn't notice this because I did not have libipt installed. This patch fixes the bug. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30169 Tested-By: Bruno Larsen --- gdbserver/linux-low.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index dec1944d45f..0ca3bb1cd6a 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -6781,7 +6781,7 @@ linux_low_encode_raw (std::string *buffer, const gdb_byte *data, elem[0] = tohex ((*data >> 4) & 0xf); elem[1] = tohex (*data++ & 0xf); - buffer->append (elem); + buffer->append (elem, 2); } *buffer += "\n"; -- 2.34.1