The MASM Forum

64 bit assembler => 64 Bit Assembler => Topic started by: fearless on May 04, 2015, 01:23:42 PM

Title: Debug64 - Debug macros and functions for 64bit JWasm
Post by: fearless on May 04, 2015, 01:23:42 PM
Original code from Donkey's vKim like tools - adapted for JWasm64
 
Original thread: www.masmforum.com/board/index.php?topic=16317.msg135041#msg135041 (http://www.masmforum.com/board/index.php?topic=16317.msg135041#msg135041)
Original download: www.masmforum.com/board/index.php?action=dlattach;topic=16317.0;id=10334 (http://www.masmforum.com/board/index.php?action=dlattach;topic=16317.0;id=10334)

How to use
Code: [Select]
     DEBUG64 EQU 1

     IFDEF DEBUG64
         PRESERVEXMMREGS equ 1
         includelib \JWasm\lib\x64\Debug64.lib
         DBG64LIB equ 1
         DEBUGEXE textequ <'\Jwasm\bin\DbgWin.exe'>
         include \JWasm\include\debug64.inc
         .DATA
         RDBG_DbgWin DB DEBUGEXE,0
         .CODE
     ENDIF
Notes

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 Debug64.inc

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