This is the mail archive of the
mailing list for the GDB project.
RE: [PATCH] $thread convenience variable
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Stan Shebs'" <stan at codesourcery dot com>, <gdb-patches at sourceware dot org>
- Date: Mon, 14 Jun 2010 11:14:28 +0200
- Subject: RE: [PATCH] $thread convenience variable
- References: <4C158675.email@example.com>
> -----Message d'origine-----
> De?: firstname.lastname@example.org [mailto:gdb-patches-
> email@example.com] De la part de Stan Shebs
> Envoyé?: Monday, June 14, 2010 3:32 AM
> À?: firstname.lastname@example.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:
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.
Pascal language support maintainer for GDB