This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: $thread convenience variable
- From: Andrew STUBBS <andrew dot stubbs at st dot com>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: Eli Zaretskii <eliz at gnu dot org>, gdb at sources dot redhat dot com
- Date: Fri, 03 Feb 2006 13:01:40 +0000
- Subject: Re: $thread convenience variable
- References: <drl4fn$4h8$1@sea.gmane.org> <u64nwyaiv.fsf@gnu.org> <200602031410.42115.ghost@cs.msu.su>
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.
Of course these substitutions currently only work within control
structures, such as if, while or user-defined commands. (Hmmm, a quick
test also shows they crash GDB if not used within a user-define.)
It would also not clutter 'show conv'.
Just a thought.
Andrew Stubbs