www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Debug/reduce stack overflow in DMD on Windows

reply Jacob Carlborg <doob me.com> writes:
I've ported one of my projects[1] from D1 to D2 and it works perfectly 
fine on Posix. Now when I try to compile the code on Windows I get a 
stack overflow. I really suck at Windows development, I don't even know 
where to start. Which debugger should I use that can handle the debug 
format DMD is compiled with?

[1] https://github.com/jacob-carlborg/dvm/tree/master

-- 
/Jacob Carlborg
Dec 30 2013
next sibling parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 30.12.2013 14:04, schrieb Jacob Carlborg:
 I've ported one of my projects[1] from D1 to D2 and it works perfectly
 fine on Posix. Now when I try to compile the code on Windows I get a
 stack overflow. I really suck at Windows development, I don't even know
 where to start. Which debugger should I use that can handle the debug
 format DMD is compiled with?

 [1] https://github.com/jacob-carlborg/dvm/tree/master
Compile in 64-bit and use Visual Studio or Visual Studio Express to debug the application. If you want to compile in 32-bit you will need to run cv2pdb on the generated exectuable before debugging with visual studio. cv2pdb is part of VisualD which I recommend using for any windows development. Kind Regards Benjamin Thaut
Dec 30 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-12-30 17:19, Benjamin Thaut wrote:

 Compile in 64-bit and use Visual Studio or Visual Studio Express to
 debug the application. If you want to compile in 32-bit you will need to
 run cv2pdb on the generated exectuable before debugging with visual
 studio. cv2pdb is part of VisualD which I recommend using for any
 windows development.
I'll give that a try, thanks. -- /Jacob Carlborg
Dec 30 2013
prev sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Monday, 30 December 2013 at 13:04:38 UTC, Jacob Carlborg wrote:
 I've ported one of my projects[1] from D1 to D2 and it works 
 perfectly fine on Posix. Now when I try to compile the code on 
 Windows I get a stack overflow. I really suck at Windows 
 development, I don't even know where to start. Which debugger 
 should I use that can handle the debug format DMD is compiled 
 with?

 [1] https://github.com/jacob-carlborg/dvm/tree/master
You could try reducing the bug using DustMite, and this helper: https://github.com/CyberShadow/DustMite/wiki/Suppressing-Windows-crashes
Dec 30 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-12-30 23:21, Vladimir Panteleev wrote:

 You could try reducing the bug using DustMite, and this helper:
Thanks, DustMite was able to find a reduced test case. It was this little piece of code: enum : DWORD { DWORD = REG_DWORD } -- /Jacob Carlborg
Dec 30 2013