News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Debug Macro

Started by ragdog, October 21, 2015, 10:20:22 PM

Previous topic - Next topic

ragdog

Hello

I need for debug my projects a little macro to set breakpoints and here is my result.
It set a Int3 breakpoint and use debug infos for find easier the code  in Olly to debug

use:
_deb "Procedur #1 debugging"


_DEBUG equ 1   ; 1 for use Debug macro 0 not use
_deb MACRO pInfo:REQ

local szText
if _DEBUG eq 1
invoke IsDebuggerPresent
.if (eax)
int 3h
.data
        szText db pInfo, 0
        .code
invoke OutputDebugString,addr szText
.endif
endif
ENDM


I find it usefull  to debug a code part in a debugger without  scrolling or tracing.

Regards,

Grincheux

Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...