On Monday, 2 April 2012 at 22:24:36 UTC, Martin Krejcirik wrote:
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

Can't reproduce. With gdc and dmd-2.058 I have correct result. GDB-7.3

Reply via email to