public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH] Fix btrace regression
Date: Tue, 28 Feb 2023 18:45:51 -0700	[thread overview]
Message-ID: <20230301014551.2840647-1-tom@tromey.com> (raw)

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
---
 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 += "</raw>\n";
-- 
2.39.1


             reply	other threads:[~2023-03-01  1:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  1:45 Tom Tromey [this message]
2023-03-01  8:39 ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230301014551.2840647-1-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).