D globals in gdb
Martin Krejcirik
mk-junk at i-line.cz
Mon Apr 2 15:24:34 PDT 2012
On 2.4.2012 19:56, simendsjo wrote:
> Unless it's shared or __gshared, every thread gets it's own copy. D
> defaults to thread local storage (TLS).
I know but the problem is, that gdb doesn't show the changed value of
TLS variable. Example:
import std.stdio;
shared int shrgl = 1;
int tlsgl = 10;
void main()
{
writefln("%s %s", shrgl, tlsgl); // prints 1,10
shrgl++; tlsgl++;
writefln("%s %s", shrgl, tlsgl); // prints 2,11
==> gdb p 'tls.shrgl' ==> 2
==> gdb p 'tls.tlslg' ==> 10
}
--
mk
More information about the Digitalmars-d-debugger
mailing list