This is the mail archive of the
gdb-patches@sourceware.org
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.9090001@codesourcery.com>
> -----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