From: alarson@ddci.com
To: gdb-patches@sourceware.org
Subject: PATCH for minor buglet in remote.c misreporting REMOTE_DEBUG_MAX_CHAR messages
Date: Fri, 02 Mar 2018 17:14:00 -0000 [thread overview]
Message-ID: <OF7B034DAF.5A6D3B6A-ON06258244.005E4499-06258244.005EBCC4@ddci.com> (raw)
In remote.c, when the output of "set debug remote" is truncated, the
number of characters reported is incorrect. What is reported is the
number of characters added by the quoting, not the number of characters
that were truncated. I'm not up to speed on the GDB patch process , but
here are the necessary changes if someone is willing to be a proxy:
--- gdb/remote.c 2017-09-07 08:28:11.000000000 -0600
+++ ../../gdb-8.0.1/gdb/remote.c 2018-03-02 11:07:33.465414200
-0600
@@ -8768,10 +8768,10 @@
fprintf_unfiltered (gdb_stdlog, "Sending packet: %s", str.c_str
());
- if (str.length () > REMOTE_DEBUG_MAX_CHAR)
+ if (len > REMOTE_DEBUG_MAX_CHAR)
{
fprintf_unfiltered (gdb_stdlog, "[%zu bytes omitted]",
- str.length () - REMOTE_DEBUG_MAX_CHAR);
+ len - REMOTE_DEBUG_MAX_CHAR);
}
fprintf_unfiltered (gdb_stdlog, "...");
@@ -9210,10 +9210,10 @@
fprintf_unfiltered (gdb_stdlog, "Packet received: %s",
str.c_str ());
- if (str.length () > REMOTE_DEBUG_MAX_CHAR)
+ if (val > REMOTE_DEBUG_MAX_CHAR)
{
fprintf_unfiltered (gdb_stdlog, "[%zu bytes omitted]",
- str.length () -
REMOTE_DEBUG_MAX_CHAR);
+ val - REMOTE_DEBUG_MAX_CHAR);
}
fprintf_unfiltered (gdb_stdlog, "\n");
next reply other threads:[~2018-03-02 17:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 17:14 alarson [this message]
2018-03-08 23:34 ` Simon Marchi
2018-03-08 23:51 ` alarson
2018-03-09 0:01 ` Simon Marchi
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=OF7B034DAF.5A6D3B6A-ON06258244.005E4499-06258244.005EBCC4@ddci.com \
--to=alarson@ddci.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