From: Tom Tromey <tom@tromey.com>
To: Keith Seitz via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Error when gdb_is_target_1 is called without running gdb instance
Date: Fri, 25 Feb 2022 09:44:09 -0700 [thread overview]
Message-ID: <87fso6oq06.fsf@tromey.com> (raw)
In-Reply-To: <20220224174106.1620437-1-keiths@redhat.com> (Keith Seitz via Gdb-patches's message of "Thu, 24 Feb 2022 09:41:06 -0800")
>>>>> "Keith" == Keith Seitz via Gdb-patches <gdb-patches@sourceware.org> writes:
Keith> This is a snafu that I encountered while implementing the previous
Keith> patch, which attempted to use gdb_is_target_native. This proc and
Keith> gdb_is_target_remote both rely on gdb_is_target_1, which actually
Keith> cannot be called without gdb already running.
Keith> This patch adds appropriate warning comments to these procs and
Keith> causes gdb_is_target_1 to issue a Tcl error if it is called without a
Keith> gdb instance already running. This should prevent unwitting callers
Keith> from using this at the wrong time.
Looks good.
This is one thing I really like about the mythical internal AdaCore test
suite: in it, when you start gdb, you get an object back, and so
something like this would be a method on the object -- impossible to
call without it.
Tom
next prev parent reply other threads:[~2022-02-25 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 17:41 Keith Seitz
2022-02-25 16:44 ` Tom Tromey [this message]
2022-02-28 15:41 ` Keith Seitz
2022-02-28 16:06 ` Tom Tromey
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=87fso6oq06.fsf@tromey.com \
--to=tom@tromey.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).