$thread convenience variable
Vladimir Prus
ghost@cs.msu.su
Fri Feb 3 13:10:00 GMT 2006
On Friday 03 February 2006 16:01, Andrew STUBBS wrote:
> Vladimir Prus wrote:
> > With it, the $thread variable will mean the last thread where we've
> > stopped, as opposed to the current one -- that is, does not change after
> > "thread XXX" command. This might be confusing to users, or might not.
>
> It might be better to do this in cli-script.c in the same way as
> $arg0-$arg9 and $argc. That way it would always be up to date and would
> be read-only.
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.
- Volodya
More information about the Gdb
mailing list