This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Is there a convenience variable for the current thread?
- From: Marc Khouzam <marc dot khouzam at ericsson dot com>
- To: "'gdb at sourceware dot org'" <gdb at sourceware dot org>
- Date: Mon, 22 Feb 2010 15:52:18 -0500
- Subject: Is there a convenience variable for the current thread?
Hi,
I would like to disable a breakpoint for a single thread.
I don't believe there is a way to do that directly in GDB,
so someone suggested I use a breakpoint condition:
> break myMultiThreadProg:10
> cond $threadId != 2
Is there a way to access the threadId in such a condition
Thanks
Marc
P.S. This is different than setting thread-specific breakpoints
on all threads except thread 2, because I need the breakpoint
to work on threads that are not yet created.