public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>,
	 Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH 3/3] Use std::string for interpreter_p
Date: Wed, 22 Jun 2022 13:50:33 -0600	[thread overview]
Message-ID: <87czf0wk8m.fsf@tromey.com> (raw)
In-Reply-To: <87iloucj26.fsf@redhat.com> (Andrew Burgess's message of "Tue, 21 Jun 2022 13:11:45 +0100")

>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:

Andrew> Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> writes:
>> The global interpreter_p is a manually-managed 'char *'.  This patch
>> changes it to be a std::string instead, and removes some erroneous
>> comments.

Andrew> I took a look through this series, and it all looks good to me.

Thanks.

Andrew> I don't like the name interpreter_p - the _p says "predicate" to me, but
Andrew> I that's not your fault, so can be fixed some other day.

Yeah.  I think maybe it means "pointer"?  Not sure.

I looked at removing this entirely, and it's almost possible except for
the hacks in tui-interp.c:

  interp_factory_register (INTERP_TUI, tui_interp_factory);

  if (interpreter_p == INTERP_TUI)
    tui_start_enabled = true;

  if (interpreter_p == INTERP_CONSOLE)
    interpreter_p = INTERP_TUI;

I don't really understand why the TUI is considered a distinct
interpreter at all.  That seems weird to me.  For one thing, I found it
doesn't work properly with "new-ui" (I filed a bug about this).

Tom

      reply	other threads:[~2022-06-22 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 13:46 [PATCH 0/3] Minor improvements to 'interp' Tom Tromey
2022-06-20 13:46 ` [PATCH 1/3] Use unique_xmalloc_ptr in interp Tom Tromey
2022-06-20 13:46 ` [PATCH 2/3] Move mi_interpreter to mi-interp.h Tom Tromey
2022-06-20 13:46 ` [PATCH 3/3] Use std::string for interpreter_p Tom Tromey
2022-06-21 12:11   ` Andrew Burgess
2022-06-22 19:50     ` Tom Tromey [this message]

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=87czf0wk8m.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=aburgess@redhat.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).