hi im new to the forums but here goes
ive been programming for 20 years and programming in asm for a while but ive desided I would like to have a debugger that can step through my source. I downloaded olly and couldn't really get on with it so I thought id try windbg but ive had problems now its turning into a mission to solve this problem
I have a standard masm32 setup and a standard windbg setup but Im having problems with my symbols ive downloaded all the needed symbols from Microsoft but it seems as though this is not the problem link does not seem to create a pdb file for windbg to find
this is the command ive been using
\masm32\bin\Link /SUBSYSTEM:WINDOWS /VERBOSE /DEBUG /DEBUGTYPE:COFF /PDB:prime.pdb prime.obj
it compiles fine but no pdb file is found anywhere on my harddrive
please help
Hi
Have you set in ML settings the Zi switch?
ml /c /coff /Cp /Zi /Zd "source.asm"
link /SUBSYSTEM:WINDOWS /DEBUG /VERSION:4.0 /OUT:"source.exe" "source.obj" "rsrc.res"
Try this.
\masm32\bin\ml /c /coff /Zi %1.asm
\masm32\bin\Link /RELEASE /DEBUG /SUBSYSTEM:WINDOWS /OPT:NOREF %1.obj rsrc.obj
Hi flipflop1,
I use the command line options below and I get the .pdb file.
\masm32\bin\ml /X /nologo /c /coff /Cp /Zp4 /Zi /Zd
\masm32\bin\Link /nologo /subsystem:windows /debug /nodefaultlib:libc
thanks ragdog and magnum
ragdog your settings worked
I will play for a bit to see which setting that was different seemed to work I think it may have been the rsrc.obj
but my problems continue do I post a new thread or continue in this thread
cheers to rsala as well
Hi flipflop 1,
welcome to the forum. Have fun. :t
Gunther
/Zi for the assembler, /debug for the linker. The /zd switch is not needed.
Note this works for ML 6.14 or 6.15 and JWasm. Higher Masm versions may throw fatal error LNK1103: debugging information corrupt.
New thread only if you have a really new theme. Nothing gets lost, most of us have this link (http://www.masm32.com/board/index.php?action=unread;all;start=0) bookmarked ;-)
Welcome to the forum :icon14:
The binary of the masm32 package need an update to be used with windbg (\masm32\bin).
Replace link.exe and all the mspdb*.dll with a more recent version,c++ express.
Quote from: jj2007 on March 26, 2013, 09:15:23 AM
Note this works for ML 6.14 or 6.15 and JWasm. Higher Masm versions may throw fatal error LNK1103: debugging information corrupt.
I guess that the
linker and not Masm is throwing the fatal error.
The reason is simple: Masm v8 and above use a newer codeview format ( v8 instead of v4 ). The problem is: if an old linker is fed with this new debugging format, it may decide to keep silent and not emit any warning - or emit a warning that is misleading. Hence: if you use Masm v8 or newer and want debug info, you
must use a MS linker from at least 2005 ( i.e. VC EE 2005 ); Polink is NOT a good replacement if WinDbg is to be used.
Quote from: japheth on March 26, 2013, 08:32:24 PM
Quote from: jj2007 on March 26, 2013, 09:15:23 AM
Note this works for ML 6.14 or 6.15 and JWasm. Higher Masm versions may throw fatal error LNK1103: debugging information corrupt.
I guess that the linker and not Masm is throwing the fatal error.
Yes, sloppy wording, sorry. Unfortunately, using higher linker versions entails new problems:
fatal error LNK1101: incorrect MSPDB???.DLL version
The best option to get debug info is imho JWasm plus MS link 6.14. Olly 1.0 shows even local variables, Olly 2.0 only the global ones.
You can get those dlls from VB package.
I have them if anyone needs them.
Andy
I have these dlls. The linker complains about incorrect installation.
i am able to make all but masm version 11 work under XP (32-bit)
the linkers that come with masm versions 9 and 10 work fine
Quote from: jj2007 on March 27, 2013, 01:42:38 AM
I have these dlls. The linker complains about incorrect installation.
For VC 2008 link, you'll need these files:
link.exe
mspdb80.dll
mspdbcore..dll
msobj80.dll
mspdbsrv.exe ( !!! )
There's no need for registry entries.
i think they should be in the same folder as the linker
and - that folder should be in the PATH
otherwise, you may get the error message
mspdbsrv ?
i didn't need that one, but i didn't test all cases (link errors, etc)
is that for masm version 9 ?
Quote from: dedndave on March 27, 2013, 02:10:16 AM
mspdbsrv ?
i didn't need that one, but i didn't test all cases (link errors, etc)
Works without that one, apparently ;-)
Thanks to Japheth my version 10 assembler & linker pair works now, with and without mspdbsrv.exe. Only that Olly 1 can't use it :(
So back to square one: (ML 6.15 or JWasm) + link 5.12 (the one supplied with Masm32).
QuoteThe binary of the masm32 package need an update to be used with windbg (\masm32\bin).
I'm using standard MASM32v11 with WinDbg without any problems. Though I'm debugging only simple examples and my own excercises.
I use Ollydbg to debug all my Coded apps
with masm32 v10 or v11 and use Radasm standart debug settings build
Quoteml /c /coff /Cp /Zi /Zd "source.asm"
link /SUBSYSTEM:WINDOWS /DEBUG /VERSION:4.0 /OUT:"source.exe" "source.obj" "rsrc.res"
I have not any update my masm32bin folder to newer versions of ml or link
And i can see all Debug information in Ollydbg
Windbg have i never try
My version 10 of link works with only mspdb100.dll.
As long as it's in the same dir.
Andy