public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Jan Vrany via Gdb-patches <gdb-patches@sourceware.org>
Cc: Jan Vrany <jan.vrany@labware.com>,
	 tom@tromey.com, Wenyan.Xin@windriver.com
Subject: Re: [PATCH v2] gdb: fix post-hook execution for remote targets
Date: Wed, 17 May 2023 12:56:23 -0600	[thread overview]
Message-ID: <871qje23e0.fsf@tromey.com> (raw)
In-Reply-To: <20230517181424.263749-1-jan.vrany@labware.com> (Jan Vrany via Gdb-patches's message of "Wed, 17 May 2023 19:14:24 +0100")

>>>>> "Jan" == Jan Vrany via Gdb-patches <gdb-patches@sourceware.org> writes:

>> I wonder if it would be possible to reimplement dont_repeat so that it
>> does not overwrite the command.  Like, could it just set a flag?

Jan> Yes, that'd make things clear. I tried couple things but each time
Jan> something broke.

Yeah, the older the code is, the more likely it is to have some bizarre
hidden dependency.

Jan> Here we compare the value of saved_command_line so we cannot easily
Jan> set the flag and then when reading input and flag is set, return empty string
Jan> instead of saved_command_line. Truth to be told, I don't understand how it works
Jan> and what exactly (for example) the code above does or why it is needed. 

Me too.

Jan> I checked that with my version of GCC, std::string s = nullptr; throws an
Jan> error and abort()s but I could not find a situation when p == NULL.

It's possible that there isn't a case, but also possible that it's just
never tested.  Difficult to reason about these things.

Anyway, this is ok.

Approved-By: Tom Tromey <tom@tromey.com>

Tom

  reply	other threads:[~2023-05-17 18:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 15:17 [PATCH] " Jan Vrany
2023-05-03 14:40 ` Jan Vraný
2023-05-10 11:14   ` Jan Vraný
2023-05-10 15:07 ` Tom Tromey
2023-05-17 18:14   ` [PATCH v2] " Jan Vrany
2023-05-17 18:56     ` Tom Tromey [this message]
2023-05-19 12:40       ` [pushed] " Jan Vrany

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=871qje23e0.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=Wenyan.Xin@windriver.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.vrany@labware.com \
    /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).