D globals in gdb
simendsjo
simendsjo at gmail.com
Tue Apr 3 00:40:05 PDT 2012
On Tue, 03 Apr 2012 07:47:40 +0200, Mihail Zenkov
<mihail.zenkov at gmail.com> wrote:
> 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
I cannot reproduce this on dmd-2.059 trunk either.
More information about the Digitalmars-d-debugger
mailing list