This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: $thread convenience variable


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]