Low level debug using MSVC debugger

Low level debug using MSVC debugger

Postby Antonio Linares » Wed Jun 05, 2013 11:25 am

I have been two days following a nasty bug, that it even made me think that could be a virus. Now I know that it is a Harbour bug and I have also reported it to the Harbour devel list:

https://groups.google.com/forum/?fromgroups#!topic/harbour-devel/YPx3LKf-RyI

But to me, the real important thing is that on a circunstance where a nasty GPF was ocurring (the GPF happened in a Windows DLL, apparently not related at all with the EXE), the Microsoft Visual C debugger has been the only tool that helped me on such important task. Thats why I think that some of you may be interested in knowing how to use such so usefull tool :-)

Thats why I think this is really important to be commented here
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 7:23 pm

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:24 pm

Add existing tutor02.prg

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:26 pm

Remove stdafx.cpp, stdafx.h, tutor02.cpp, tutor02.h and targetver.h

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:35 pm

Edit tutor02.prg properties:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:36 pm

Select Custom Build tool:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:38 pm

c:\harbour\bin\harbour %(FullPath) /n /ic:\harbour\include /ic:\fwh\include

.\%(Filename).c

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:51 pm

Compile tutor02.prg as we need to add the resulting tutor02.c into the project too:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:52 pm

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:54 pm

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Thu Jun 06, 2013 9:55 pm

Don't use precompiled headers:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Fri Jun 07, 2013 4:10 am

Edit tutor02.c properties:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Fri Jun 07, 2013 4:11 am

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Fri Jun 07, 2013 4:15 am

Now we add the Harbur libraries for MSVC:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Low level debug using MSVC debugger

Postby Antonio Linares » Fri Jun 07, 2013 4:16 am

and we select all the Harbour libraries. On a next step we will remove the ones that we don't need:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 43 guests