Low level debug using MSVC debugger

User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Low level debug using MSVC debugger

Post by Antonio Linares »

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: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Add existing tutor02.prg

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

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: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Edit tutor02.prg properties:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Select Custom Build tool:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

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: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

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: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Don't use precompiled headers:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Edit tutor02.c properties:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

Now we add the Harbur libraries for MSVC:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42521
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Low level debug using MSVC debugger

Post by Antonio Linares »

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
Post Reply