[PATCH] $thread convenience variable

Pierre Muller pierre.muller@ics-cnrs.unistra.fr
Mon Jun 14 09:14:00 GMT 2010



> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Stan Shebs
> Envoyé : Monday, June 14, 2010 3:32 AM
> À : gdb-patches@sourceware.org
> Objet : [PATCH] $thread convenience variable
> 
> This little patch adds a periodically-requested convenience variable
> whose value is the current thread.  It's handy in scripts and
> conditionals, since the GDB-assigned thread id is unpredictable.
> 
> Although the original request was for "$thread", it might be better to
> make it "$_thread" instead, so as not to interfere with possible use in
> existing scripts.  But I'll only change it if I get enough votes in
> favor. :-)

  By analogy with:
 _exitcode
 _siginfo
and
 _tlb 
internal variables defined so far,
I would vote in favor of '$_thread'.

  The only other internal variables I found
are 'bpnum', 'tpnum' and a whole bunch of 'trace_.*' variables.


Pierre Muller
Pascal language support maintainer for GDB





More information about the Gdb-patches mailing list