The MASM Forum

General => The Laboratory => Topic started by: ragdog on October 21, 2015, 10:20:22 PM

Title: Debug Macro
Post by: ragdog on October 21, 2015, 10:20:22 PM
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"

Code: [Select]
_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,
Title: Re: Debug Macro
Post by: Grincheux on December 07, 2015, 04:51:08 AM
Usefull. Thx