News:

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

Main Menu

64 bit debuggers for masm 64

Started by markallyn, October 01, 2017, 08:30:44 AM

Previous topic - Next topic

markallyn

Hello everyone,

I am to trying to use Windbg (64-bit).  I have Windbg running, but I don't know how to provide it with debug symbols.  I'm assembling with ml64.exe and linking with polink.  What switches do I need to set?  I've exhausted my ability to Google on this one.

Thanks,
Mark Allyn

felipe

I think aw27 knows a lot of windbg. But if it's too complicated to start with, you can try x64dbg instead.  ;)

sinsi

Do you mean using the Microsoft symbols? That uses an environment variable
Quote_NT_SYMBOL_PATH=srv*c:\symbols*http://msdl.microsoft.com/download/symbols

Windbg should load the pdb file from the program directory automatically.

Vortex

Hi markallyn,

I use x64dbg. It's a very good tool.

aw27

Quote from: felipe on October 01, 2017, 03:29:42 PM
I think aw27 knows a lot of windbg.
Nobody knows a lot about Windbg, it has infinite possibilities.  :icon_rolleyes:
The most import first step is to get a decent Workspace. A suggestion is this one.

markallyn

Thanks all of you for trying to help-

Sinsi:  How do I get a PDB file from Polink?  There seems to be no /PDB switch.

Vortex and Felipe:  I've tried to install x64dbg, but when I unzip to the window where I am supposed to be able to launch x64, nothing happens when I click on that button.  Can you suggest what I should do?

Thanks again for your help.

Mark Allyn

markallyn

Hello Sinsi,

Also, I am using Polink because when I try to generate a PDB file from link.exe the linker kicks out the following fatal error message:  "incorrect MSPD100.DLL version: recheck installation of this product".  There is a dll by that name in the directory with the link executable, by the way.

Mark

felipe

Sorry, i have installed (but don't remember, maybe there is nothing to install) x32dbg and x64dbg some months ago and can't remember right now how i did it. Also i don't have the time now for doing it again. Try to check the debbuger page for instructions.  :idea:

Vortex

Hi mark,

x64dbg is a portable application. Downloaded today the latest version snapshot_2017-09-12_00-45.zip and extracted the content to the folder C:\x64dbg

Executing the 64-bit debugger :

C:\x64dbg\release\x64\x64dbg.exe

LiaoMi

Quote from: Vortex on October 02, 2017, 05:18:56 AM
Hi mark,

x64dbg is a portable application. Downloaded today the latest version snapshot_2017-09-12_00-45.zip and extracted the content to the folder C:\x64dbg

Executing the 64-bit debugger :

C:\x64dbg\release\x64\x64dbg.exe

snapshot_2017-09-30_14-39.zip  ::)

Vortex

Here, the latest release dates September 12 ( snapshot_2017-09-12_00-45.zip ) :

https://sourceforge.net/projects/x64dbg/files/snapshots/

Checking github, the latest release is snapshot_2017-10-01_14-37.zip :

https://github.com/x64dbg/x64dbg/releases

jj2007

The x64dbg design was ruthlessly stolen from Olly, with one important difference: To make x64dbg work properly, you need to set SkipInt3Stepping=1 in x64dbg.ini; otherwise it will get stuck at your int 3.

sinsi

Hi Mark,
I don't use polink but mslink uses two switches, /debug /debugtype:coff

jj2007

Apparently, /Zi /Zf for the assembler and /debug for the linker are enough.

I've installed the latest x64dbg now, and it works most of the time (on my Win7-64 machine, x64dbg often crashes on exit; it has problems saving its database); here is a testbed, paste in RichMasm and hit F6.

include \Masm32\MasmBasic\Res\JBasic.inc        ; install
Init           ; OPT_64 1      ; in RichMasm, hit F6 to launch \Masm32\x64Dbg\release\x64\x64dbg.exe
  int 3
  PrintLine Chr$("This code was assembled with ", @AsmUsed$(1), " in ", jbit$, "-bit format")
  MsgBox 0, "Wow, it works!!!!", "Hi", MB_OK or MB_SETFOREGROUND
EndOfCode

markallyn

Hello everyone,

Thanks to all of you for helping out on this.  Here is current status.

After struggling with the x64dbg zip file I finally--though I can't quite figure out how--managed to install it.  It seems to run OK.  Question:  what switches do I need in ml64.exe and polink in order to get usable debug information?  Polink objects strongly to using the /DEBUG switch and complains about codeview symbols being present in the .obj file.  What's with that?  It complains even when I don't use /Zi and /Zd in the assemble step.  Perhaps a different linker?

Sinsi: Someday when I've grown up I will try again to do Windbg, but until I can figure out what's going on with this MSPDB100.DLL that seems to be a dead end.  This problem, as mentioned earlier, is why I turned to Polink.

jj2007:  I am hunting for x64dbg.ini.  Haven't found it yet.

I'm still not there yet, but pluggin' away.

Mark