From: Tom Tromey <tom@tromey.com>
To: Pedro Alves <pedro@palves.net>
Cc: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [RFC][gdb/cli] Add convenience vars _wp_old_val and _wp_val
Date: Fri, 07 Oct 2022 13:41:57 -0600 [thread overview]
Message-ID: <87o7uns9oa.fsf@tromey.com> (raw)
In-Reply-To: <0fd34b60-1eba-c7cf-3792-13cc2c2b1d9b@palves.net> (Pedro Alves's message of "Fri, 30 Sep 2022 16:37:40 +0100")
Pedro> It can't be safely used in regular CLI after the watchpoint hit is process, though,
Pedro> given another watchpoint may trigger meanwhile. I mean, say, in non-stop, you do:
FWIW gdb probably already has this problem with some other convenience
variables, like $_exitcode, $_exception, $_probe_*, ...
So, maybe adding one more isn't so bad. Or maybe now is when we want to
think of a general solution.
I'm not sure this works though:
Pedro> A way to make this safer would be to make it a convenience function instead, that
Pedro> takes as argument the number of the watchpoint, like:
... because it seems to me that the same watchpoint can be hit any
number of times.
Tom
next prev parent reply other threads:[~2022-10-07 19:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 9:16 Tom de Vries
2022-09-30 15:37 ` Pedro Alves
2022-10-07 19:41 ` Tom Tromey [this message]
2022-10-08 6:11 ` Tom de Vries
2022-10-10 13:49 ` 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=87o7uns9oa.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).