Author Topic: Debug64 - Debug macros and functions for 64bit JWasm  (Read 3861 times)


  • Member
  • ****
  • Posts: 525
    • Github
Debug64 - Debug macros and functions for 64bit JWasm
« on: May 04, 2015, 01:23:42 PM »
Original code from Donkey's vKim like tools - adapted for JWasm64
Original thread:
Original download:;topic=16317.0;id=10334

How to use
  • Copy DbgWin.exe to JWasm\bin (or other location as suits your setup)
  • Copy to your JWasm\include folder (or wherever your includes are located)
  • Copy Debug64.lib to your JWasm\Lib\x64 folder (or wherever your 64bit libraries are located)
  • Copy Libs\*.lib to JWasm\Lib\x64 folder (or wherever your 64bit libraries are located) (optional, cept maybe for ntdll.dll which probably is required)
  • Include in your project, somewhere at the start:
Code: [Select]
     DEBUG64 EQU 1

         PRESERVEXMMREGS equ 1
         includelib \JWasm\lib\x64\Debug64.lib
         DBG64LIB equ 1
         DEBUGEXE textequ <'\Jwasm\bin\DbgWin.exe'>
         include \JWasm\include\
         RDBG_DbgWin DB DEBUGEXE,0
  • Adjust the path settings in the above code block to suit your own dev environment
  • Use the debug macros in your code

Changed the DEBUGEXE define to an external definition that is set outside of the debug64 library in the users project instead.
Currently I have only tested these macros: PrintText, PrintString, PrintDec, PrintQWORD
Couldn't get PrintStringByAddr to work properly. DbgDump & DumpMem don't seem to work either. Probably an error in my conversion and/or macros are incorrect for these functions. Haven't looked at any other functions, the prototypes for all others that I haven't looked at the ones that are commented out in

Some 64bit libs are included, just in case someone doesn't have them for some reason - ntdll.lib specifically, which I had to go looking for.

Original source is included in a separate folder, or can be downloaded from the masm forum board, links above.
Included a DbgTest radasm project to show example of use for currently tested macros.

If anyone wants to contribute by testing, adjusting code, converting functions and macros etc, then feel free to do so. Hopefully whats included is enough to get the ball rolling :D

Lian Li PC-O11DW Case, ASUS Crosshair VIII Hero, AMD Ryzen 9 5950X, 32GB DDR4, MSI RX 5700XT, NZXT Kraken Z73, Seasonic 1000W PSU

My Github  Twitter  My Gitbook