www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.debugger - Debug dmd2 using gdb 7.6 on windxp

reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
Hi,
I want to debug my application using gdb, i used last mingw 
version that include gdb7.6, i use CodeBlock as editor, but i 
notice gdb can't run my exe in windows xp(sp3), i added -gc to 
compiler but it fail to start gdb

dmd -gc hello.d
gdb hello.exe

If it work it will work with CodeBlock debugger for windows.

If not it is supported what should i use? CodeBlock have another 
option CDB, from where i can install it?

thanks in advance.
Oct 16 2014
next sibling parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
I searched before, but i found this after post

https://groups.google.com/forum/#!topic/ddt-ide/CGDT7ucgZvU

this very old
http://forum.dlang.org/thread/ck0rbi$2cn1$1 digitaldaemon.com
Oct 20 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
I found CDB in WinSDKWin32Tools in DVD that you can download it 
from Microsoft site

http://www.microsoft.com/en-us/download/details.aspx?id=8442
I choose GRMSDK_EN_DVD.iso

More info
https://developer.mozilla.org/en-US/docs/Windows_SDK_versions#Windows_7_SDK

I will try it.

On Monday, 20 October 2014 at 11:47:12 UTC, Zaher Dirkey wrote:
 I searched before, but i found this after post

 https://groups.google.com/forum/#!topic/ddt-ide/CGDT7ucgZvU

 this very old
 http://forum.dlang.org/thread/ck0rbi$2cn1$1 digitaldaemon.com
Oct 21 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
Mission failed
Oct 24 2014
parent reply "Martin Krejcirik" <mk-junk i-line.cz> writes:
What compiler are you using ? Maybe gdc can produce debug info 
compatible with gdb on Windows. If that fails, you have to use 
visualD, which works great.
Oct 24 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
On Friday, 24 October 2014 at 11:21:20 UTC, Martin Krejcirik 
wrote:
 What compiler are you using ? Maybe gdc can produce debug info 
 compatible with gdb on Windows. If that fails, you have to use 
 visualD, which works great.
I used last one DMD2 gdc made some conflicts versions with my mingw, so i will retry it. about VisualD, is it need Visual Studio paid version? it is not worked with Express version :( I liked D i will keep trying to use it :)
Oct 28 2014
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 28.10.2014 19:34, Zaher Dirkey wrote:
 On Friday, 24 October 2014 at 11:21:20 UTC, Martin Krejcirik wrote:
 What compiler are you using ? Maybe gdc can produce debug info
 compatible with gdb on Windows. If that fails, you have to use
 visualD, which works great.
I used last one DMD2 gdc made some conflicts versions with my mingw, so i will retry it. about VisualD, is it need Visual Studio paid version? it is not worked with Express version :(
Indeed, Visual D does not work with the Express versions because they don't support extensions. Instead, you can use the free Visual Studio Shell. See the installation hints here: http://rainers.github.io/visuald/visuald/Installation.html
 I liked D i will keep trying to use it :)
Oct 28 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
While i am trying to download VS2010, I will go to install gdc, 
there is only version for mingw 4.6 for windows but, i have 4.8, 
do i need to revert back to mingw 4.6?
Oct 29 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
Failed to install VS2010 i have links to download but icons not 
appears, So i downloaded VS2080 and VisualD (VisualD in 
c:\programs\visuald), Create new D project in c:\temp\testd (no 
spaces)
but then i have Error in compiling

------ Rebuild All started: Project: testd, Configuration: Debug 
Win32 ------
Building Debug\testd.exe...
"Debug\testd.exe_cv" not created!
Building Debug\testd.exe failed!
Details saved as 
"file://c:\temp\testd\testd\testd\Debug\testd.buildlog.html"
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped 
==========

On Wednesday, 29 October 2014 at 18:03:33 UTC, Zaher Dirkey wrote:
 While i am trying to download VS2010, I will go to install gdc, 
 there is only version for mingw 4.6 for windows but, i have 
 4.8, do i need to revert back to mingw 4.6?
Oct 31 2014
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 31.10.2014 11:31, Zaher Dirkey wrote:
 Failed to install VS2010 i have links to download but icons not appears,
 So i downloaded VS2080 and VisualD (VisualD in c:\programs\visuald),
 Create new D project in c:\temp\testd (no spaces)
 but then i have Error in compiling

 ------ Rebuild All started: Project: testd, Configuration: Debug Win32
 ------
 Building Debug\testd.exe...
 "Debug\testd.exe_cv" not created!
 Building Debug\testd.exe failed!
 Details saved as
 "file://c:\temp\testd\testd\testd\Debug\testd.buildlog.html"
 ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I guess you are using the VS shell. As explained in the installation instructions [1], VS 2008 Shell is missing the file msobj80.dll that is needed for the debug info conversion. You need to extract that from other products as the Express version. I rather recommend using the VS 2013 Shell instead, it doesn't need additional files. [1] http://rainers.github.io/visuald/visuald/Installation.html
Oct 31 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
On Friday, 31 October 2014 at 11:02:29 UTC, Rainer Schuetze wrote:
 On 31.10.2014 11:31, Zaher Dirkey wrote:
 Failed to install VS2010 i have links to download but icons 
 not appears,
 So i downloaded VS2080 and VisualD (VisualD in 
 c:\programs\visuald),
 Create new D project in c:\temp\testd (no spaces)
 but then i have Error in compiling

 ------ Rebuild All started: Project: testd, Configuration: 
 Debug Win32
 ------
 Building Debug\testd.exe...
 "Debug\testd.exe_cv" not created!
 Building Debug\testd.exe failed!
 Details saved as
 "file://c:\temp\testd\testd\testd\Debug\testd.buildlog.html"
 ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped
Yes i already moved it, to the path, not worked, Now it is work after restating my computer and finally the debugger work for me, the strange about programming world. VS2013 need win7, i have XP :( Thank you
Oct 31 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
Also there is another problem i fixed, it is cv2pdb that come 
with VisualD, it is win64 so i installed original one form

http://dsource.org/projects/cv2pdb
Oct 31 2014
next sibling parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 31.10.2014 16:09, Zaher Dirkey wrote:
 Also there is another problem i fixed, it is cv2pdb that come with
 VisualD, it is win64 so i installed original one form

 http://dsource.org/projects/cv2pdb
Strange, the project does not even have an x64 configuration. It seems building with VS2013 sets the "required OS version" to 6, which is too large for XP. I'll change this...
Oct 31 2014
parent "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
Thank you Rainer, yes, it is show me as not win32 error.
now it is work on 2008 like a charm.

On Friday, 31 October 2014 at 16:38:04 UTC, Rainer Schuetze wrote:
 On 31.10.2014 16:09, Zaher Dirkey wrote:
 Also there is another problem i fixed, it is cv2pdb that come 
 with
 VisualD, it is win64 so i installed original one form

 http://dsource.org/projects/cv2pdb
Strange, the project does not even have an x64 configuration. It seems building with VS2013 sets the "required OS version" to 6, which is too large for XP. I'll change this...
Nov 02 2014
prev sibling parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
We need to add to the environment

_NT_SYMBOL_PATH=srv*c:\DownstreamStore*http://msdl.microsoft.com/download/symbols

//it just a note for my self

On Friday, 31 October 2014 at 15:09:48 UTC, Zaher Dirkey wrote:
 Also there is another problem i fixed, it is cv2pdb that come 
 with VisualD, it is win64 so i installed original one form

 http://dsource.org/projects/cv2pdb
Nov 03 2014
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 03.11.2014 15:31, Zaher Dirkey wrote:
 We need to add to the environment

 _NT_SYMBOL_PATH=srv*c:\DownstreamStore*http://msdl.microsoft.com/download/symbols
Do you mean this has an influence on using cv2pdb? I would be surprised. For the Visual Studio debugger you can also set this path in Tools->Options->Debugging->Symbols. Newer versions of VS also have the symbol servers pre-configured.
Nov 03 2014
prev sibling parent reply "ljkp" <ljkp nowhere.st> writes:
On Thursday, 16 October 2014 at 11:25:07 UTC, Zaher Dirkey wrote:
 Hi,
 I want to debug my application using gdb, i used last mingw 
 version that include gdb7.6, i use CodeBlock as editor, but i 
 notice gdb can't run my exe in windows xp(sp3), i added -gc to 
 compiler but it fail to start gdb

 dmd -gc hello.d
 gdb hello.exe

 If it work it will work with CodeBlock debugger for windows.

 If not it is supported what should i use? CodeBlock have 
 another option CDB, from where i can install it?

 thanks in advance.
Hi, look at this too: http://forum.dlang.org/thread/dds1ei$2ff9$1 digitaldaemon.com?page=2#post-ddu63o:241h7v:241:40digitaldaemon.com i've just tried today and even if it's been posted 10 years ago it still works. CDB can be grabbed here: http://download.cnet.com/Debugging-Tools-for-Windows/3000-2086_4-10907878.html
Nov 02 2014
parent reply "Zaher Dirkey" <zaherdirkey yahoo.com> writes:
 ljkp
I retried with the CDB, Not worked, maybe i have bad 
configuration for cdb debugger in CodeBlock. do i need to add 
like Arguments or Initialization commands?

On Sunday, 2 November 2014 at 15:27:52 UTC, ljkp wrote:
 On Thursday, 16 October 2014 at 11:25:07 UTC, Zaher Dirkey 
 wrote:
 Hi,
 I want to debug my application using gdb, i used last mingw 
 version that include gdb7.6, i use CodeBlock as editor, but i 
 notice gdb can't run my exe in windows xp(sp3), i added -gc to 
 compiler but it fail to start gdb

 dmd -gc hello.d
 gdb hello.exe

 If it work it will work with CodeBlock debugger for windows.

 If not it is supported what should i use? CodeBlock have 
 another option CDB, from where i can install it?

 thanks in advance.
Hi, look at this too: http://forum.dlang.org/thread/dds1ei$2ff9$1 digitaldaemon.com?page=2#post-ddu63o:241h7v:241:40digitaldaemon.com i've just tried today and even if it's been posted 10 years ago it still works. CDB can be grabbed here: http://download.cnet.com/Debugging-Tools-for-Windows/3000-2086_4-10907878.html
Nov 03 2014
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 03.11.2014 15:50, Zaher Dirkey wrote:
  ljkp
 I retried with the CDB, Not worked, maybe i have bad configuration for
 cdb debugger in CodeBlock. do i need to add like Arguments or
 Initialization commands?
I'm not sure it was obvious but cdb is a command line version of the Microsoft windows debugger (windbg) and is not compatible with gdb. Both windbg and cdb should work with dmd compiled executables (after conversion with cv2pdb for Win32), but I guess these have not been tried lately because the VS experience is so much better... You might also be interested in switching the debug engine in the project settings to "Mago". This is a debug engine written for the D programming language, so, for example, you don't have to fall back to C syntax for watch expression.
Nov 03 2014