Author Topic: Debug Macro  (Read 2180 times)

ragdog

  • Member
  • ****
  • Posts: 610
Debug Macro
« 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,
« Last Edit: October 22, 2015, 12:53:27 AM by ragdog »

Grincheux

  • Member
  • ***
  • Posts: 330
  • Never be pleased, Always improve
    • Asm for fun
Re: Debug Macro
« Reply #1 on: December 07, 2015, 04:51:08 AM »
Usefull. Thx
Kenavo (Bye)
----------------------
Asm for Fun
My Links
"La garde meurt mais ne rend pas"
Cambronne à Waterloo