From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] [gdb/remote] Reimplement escape_buffer
Date: Mon, 23 Mar 2026 08:12:57 -0600 [thread overview]
Message-ID: <87o6ke8wie.fsf@tromey.com> (raw)
In-Reply-To: <20260321094433.3298268-1-tdevries@suse.de> (Tom de Vries's message of "Sat, 21 Mar 2026 10:44:33 +0100")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> Reimplement function escape_buffer in gdb/remote.c, to print c_isprint chars
Tom> like the actual chars, and others like octal escape sequences, getting us
Tom> instead:
Tom> - stb.putstrn (buf, n, '\\');
Supposedly putstrn does this quoting already.
Why doesn't that work? See ui_file::printchar.
Tom> + /* Append 3-wide leading zero octal \ooo. */
Tom> + string_appendf (str, "\\%03hho", c);
I wonder if %hh actually works properly with the gdb format code.
I don't recall ever seeing this before.
Tom
next prev parent reply other threads:[~2026-03-23 14:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 9:44 Tom de Vries
2026-03-23 14:12 ` Tom Tromey [this message]
2026-03-23 17:20 ` Tom de Vries
2026-03-23 18:28 ` Tom Tromey
2026-03-24 15:34 ` 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=87o6ke8wie.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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