$thread convenience variable

Andrew STUBBS andrew.stubbs@st.com
Fri Feb 3 13:04:00 GMT 2006


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



More information about the Gdb mailing list