new(malloc) locks everything in multithreading

tcak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 24 18:11:06 PDT 2014


On Friday, 24 October 2014 at 21:02:05 UTC, Kapps wrote:
> On Friday, 24 October 2014 at 18:38:39 UTC, tcak wrote:
>> On Friday, 24 October 2014 at 16:51:02 UTC, Kapps wrote:
>>
>> This is what I did on shell: (I put some spaces for 
>> readability)
>>
>> tolga at tolga:~/dev/d/bug$ dmd -gc -debug test.d
>>
>> tolga at tolga:~/dev/d/bug$ gdb ./test
>>
>
> Yes, GDB is stopping on SIGUSR1 / SIGUSR2 since that's the 
> default settings. D's GC uses these signals for suspending / 
> resuming threads during a collection. You need to type what I 
> said above, prior to typing 'run'.

I was desperately looking for a solution how to do this on Mono-D 
instead
of entering on shell. Then I have found this link:

http://www.mono-project.com/docs/debug+profile/debug/

Under the title "Debugging with GDB", it says to create 
".gdbinit" file
in home folder and put those "handle SIGUSR1..." things into it. 
Then
I opened the preferences of MonoDevelop, and brought the GDB with 
D language
support as first in preferred debugger list.

Tada! It works now. I really thank you.

BUT, since Mono-D comes with "GDB with D language support" as 
well, this
process should have been automated in my opinion knowing that GC 
would
be using those signals.


More information about the Digitalmars-d-learn mailing list