From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: Vladimir Prus <ghost@cs.msu.su>, Eli Zaretskii <eliz@gnu.org>,
gdb@sources.redhat.com
Subject: Re: $thread convenience variable
Date: Mon, 06 Feb 2006 23:52:00 -0000 [thread overview]
Message-ID: <20060206235220.GC523@nevyn.them.org> (raw)
In-Reply-To: <43E36080.4080503@st.com>
On Fri, Feb 03, 2006 at 01:54:08PM +0000, Andrew STUBBS wrote:
> Vladimir Prus wrote:
> >Is that technically feasible? The $thread variable must be set before the
> >call to bpstat_stop_status, otherwise you can't use $thread in breakpoint
> >condition. Well, you can, but when evaluating breakpoint condition you'll
> >use the old value of $thread, not the number of the thread where we've
> >stopped.
> >
> >Unless cli-script.c is somehow invoked from handle_inferior_event.
>
> You're quite right, cli-script.c probably isn't the place to put this
> stuff. It would convert it at the wrong time and wouldn't work. Somehow
> I got confused with attaching command scripts to the breakpoint, not
> conditions. In that case it would work.
>
> What I really meant to say was _like_ the ones in cli-script.c. The code
> might live somewhere else.
>
> My point was that a (read-only) substitution might be better than a
> generic convenience variable for this purpose.
>
> Anyway, it was just a suggestion, and, thinking about it again, it
> probably would be quite difficult to get it substituted in all the right
> places at all the right times without limiting its scope somehow.
It ought to be able to live near the rest of the internalvar code in
value.c, I expect.
But you're right that this wouldn't be easy. If you want to implement
the simpler version (last stopped thread), I recommend naming it
something else, so that we don't get bug reports about it not following
"thread". And that will leave the option of implementing "$thread"
open, later.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-02-06 23:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 20:19 Vladimir Prus
2006-02-03 10:58 ` Eli Zaretskii
2006-02-03 11:10 ` Vladimir Prus
2006-02-03 11:28 ` Eli Zaretskii
2006-02-03 11:59 ` Vladimir Prus
2006-02-03 15:14 ` Eli Zaretskii
2006-02-03 13:04 ` Andrew STUBBS
2006-02-03 13:10 ` Vladimir Prus
2006-02-03 13:56 ` Andrew STUBBS
2006-02-06 23:52 ` Daniel Jacobowitz [this message]
2006-02-06 23:49 ` Daniel Jacobowitz
2006-02-07 10:59 ` Andrew STUBBS
2006-02-07 19:31 ` Daniel Jacobowitz
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=20060206235220.GC523@nevyn.them.org \
--to=drow@false.org \
--cc=andrew.stubbs@st.com \
--cc=eliz@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=ghost@cs.msu.su \
/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