public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@polymtl.ca>,
	 Jan Vrany <jan.vrany@labware.com>
Subject: Re: [PATCH RESEND] gdb: remove static buffer in command_line_input
Date: Thu, 15 Dec 2022 14:44:51 -0700	[thread overview]
Message-ID: <874jtwcpf0.fsf@tromey.com> (raw)
In-Reply-To: <20221215190625.758546-1-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Thu, 15 Dec 2022 14:06:25 -0500")

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> [I sent this earlier today, but I don't see it in the archives.
Simon> Resending it through a different computer / SMTP.]

I didn't see it either.

Simon> Fix that by removing the static buffer.

Wow, I've wanted to remove 'struct buffer' for a while now, this is a
big step toward that.

Simon> So, it started with modifying command_line_input as described above, all
Simon> the other changes derive directly from that.

It's hard to review / understand a change like this but it seems ok to
me, as far as I can tell.

Simon> One slightly shady thing is in handle_line_of_input, where we now pass a
Simon> pointer to an std::string's internal buffer to readline's history_value
Simon> function, which takes a `char *`.  I'm pretty sure that this function
Simon> does not modify the input string, because I was able to change it (with
Simon> enough massaging) to take a `const char *`.

I think sending a note to upstream readline would be good.

thanks,
Tom

  reply	other threads:[~2022-12-15 21:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 19:06 Simon Marchi
2022-12-15 21:44 ` Tom Tromey [this message]
2022-12-16  2:49   ` Simon Marchi
2022-12-16 13:21 ` Pedro Alves
2022-12-16 13:38   ` Simon Marchi
2022-12-16 14:11     ` Pedro Alves

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=874jtwcpf0.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.vrany@labware.com \
    --cc=simon.marchi@polymtl.ca \
    /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).