Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu


Started by shankle, April 09, 2015, 09:29:14 PM

Previous topic - Next topic


I'm tired of the hassle of tying to debug 64-bit programs with messagebox.
x64_dbg (still under development) seemed like it would do what I want.
Show my code with symbols like softice used to do.
I tried putting the code in the linker to use the debugger and got an error.

Question is now how to proceed. I think x64_dbg is not usable with GoLink.
It was suggested that I use other linkers.


Hi shankle,

you could try jWlink instead. Here is a link for downloading it.

You have to know the facts before you can distort them.


Thank You Gunther for responding.
I know GoAsm has a program called GoDebug.
As far as I know it's only for 32-bit programs.
Am I correct???


Hi shankle,

GoBug is only 32-bit :

QuoteDebugger - "GoBug" - A free Win32 symbolic debugger for assembler programmers, together with "Testbug" its accompanying test program and Win32+assembler demo program. It is itself written entirely in assembler, using my assembler GoAsm and my linker GoLink.
Go to the GoBug site for more details and for free download here.


Thank you Vortex.
That settles that. Must learn to love the messagebox I guess.


messagebox is a painful way to debug, have you tried Donkey's vKim like tools:

also what is the output from the linker's when you used those arguments?

plus im wondering if there needs to be a space seperating the arguments, so:
/debug /debugtype:cv /pdb:"myproggie.pdb"
instead of
and the pdb arg might need the : as well
try it with jwlink and link and post up the console output to see if we can help figure it out for you


This is in reply to the request by Fearless.
In reference to Messageboxes: Painful  is hardly adequate.

Set INCLUDE=e:\codejps
Set PATH=e:\codejps
GoAsm /x64/b/c someP64.asm
GoLink /unused someP64.obj

This is what the above generated:
   E:\codejps>/debug /debugtype:cv/pdb:"someP64.pdb"
   '/debug' is not recognized as an internal or external command
   someP64 is in the codejps folder.
   Other programs work with the above minus the
   debug line.
Although I appreciate the work that Donkey has done
in the Vkim like tools and I applaud him for it,
it is way over my head.

I've never used jwlink.


if you don't like message boxes...

it's easy to add a status bar
then, a simple macro to put text in it
nice thing about that is, you don't have to acknowledge it with a click


does it complain if you just put /debug/debugtype:cv ?

also maybe try and specify a complete path like e:\codejps\myproject\myproject.pdb for the /pdb: argument and see if it likes that.

The vKim like tools shouldnt be too difficult to include, just add (for x64) in your source .asm

   #define DBG64LIB "c:\GoAsm\dbg\Debug64.lib"
   #define DEBUGEXE "c:\GoAsm\dbg\DbgWin.exe"
   #include "c:\GoAsm\dbg\Debug64.a"

modify for where your GoAsm is, for example if its stored in codejps then create a dbg folder, and copy the .a, .lib and dbgwin.exe into it:

   #define DBG64LIB "e:\codejps\dbg\Debug64.lib"
   #define DEBUGEXE "e:\codejps\dbg\DbgWin.exe"
   #include "e:\codejps\dbg\Debug64.a"

For x64 the debug.a (or for x86) has all the macros that you use in it.

so for x86 masm i would use stuff like

Invoke MessageBox, hWnd, Addr szMsg, Addr szTitle, MB_OK
PrintDec eax ; shows return value in the DbgWin.exe program that will popup - or if its already running.

for x64 i dont know the specifics and for use with goasm, but i would imagine youll be using PrintQWORD macro's to see returned values

Other useful ones are PrintString, PrintStringByAddr, DumpMem, DbgDump

Maybe worth trying it out, will be 100 x better than messageboxes if you get it working:D


Thank you Fearless for responding.
I hate to see you spending so much time on this but I appreciate it.
    /debug/debugtype:cv  -- the system cannot find the path specified

    /debug /debugtype:cv/e:\codejps\someP.asm\someP.pdb -- /debug is not
    recognized as an internal or external command



Try placing it onto the end of the GoLink line of the batch file, instead of on its own line. It'ill probably require spaces before each / too


Yes i agree. Sounds like coz its on its own line its thinking your trying to run a /debug command or batch file, and when it cant find it, it complains

so maybe try the full line in a cmd window, with spaces before each argument switch the '/' part:

GoLink /unused someP64.obj /debug /debugtype:cv /pdb:someP64.pdb

and let us know the output of that, if that line works, then just replace that in your batch file.


Here is the result you requested with the debug stuck
at the end of the GoLink.
   e:\codejps>GoLink /unused someP64.obj /debug /debuggertype:
   cv /pdb:"someP64.pdb"
   Please give debug type:-
   coff = embedded coff symbols
   dbg = coff symbols in dbg file
   output file not made


Looking at the golink manual online ( it appears golink only supports /debug coff and no other options.
GoLink /unused someP64.obj /debug coff

should add debugging information to the exe, but i dont know if this will be enough for the x64dbg debugger.

I looked at pelles c polink, jwlink and a few others but i cant see an option for a pdb file. The only one that will have it is the one from a visual c package (in a visual studio distribution)

You might have to download a visual studio of some type - express edition or whatever and copy the 64bit link.exe from that to wherever you goasm stuff is located. In the visual studio stuff the 64bit link.exe is normally located in C:\Program Files (x86)\Microsoft Visual Studio X\VC\BIN\amd64\link.exe - where X is the visual studio version.

Or maybe someone can put together a 64bit version for you from someone who has visual studio installed - it would need all the dependent .dlls in a package for use.


Quote from: fearless on April 12, 2015, 09:50:59 AM
You might have to download a visual studio of some type - express edition or whatever and copy the 64bit link.exe from that to wherever you goasm stuff is located.

- That one doesn't work for me either. When used with /debug complains "incorrect MSDB100.DLL version" but I have the correct version. Re-loaded it to make sure. Works fine for everything but /debug, Bill only knows why.

I could zip it and post it but, aren't there copyright issues involved? Don't want to get hutch in trouble :) But if someone can assure me it's legal I'd be happy to do so - altho like I say it doesn't work anyway
I am NaN ;)