I know it is asked several times but I searched all board and couldnt found a solution to make map file and symbolic debugging.
According to mas32's help file I have changed buildall.bat to


\masm32\bin\ml /COFF /Zi %1.asm
if errorlevel 1 goto errasm

if not exist rsrc.obj goto nores

\masm32\bin\Link /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV %1.obj rsrc.obj
if errorlevel 1 goto errlink


it says
MASM : warning A4018: invalid command-line option : /COFF
Assembling: C:\MASM32\proj1\proj1.asm
MASM : fatal error A1020: cannot find link.exe

is there a anyway to make it work with thisverson of ml and link exe or do I need another version.Thanks
Posted on 2001-11-04 05:07:30 by LaptoniC
The command line args are case sensative, use "/coff" instead of "/COFF".

You will also need the "/c" option to stop it from linking (so you can link yourself separately).

Mirno
Posted on 2001-11-04 06:42:20 by Mirno
Okay I have changed my bldall.bat to


\masm32\bin\ml /coff /Zi /c %1.asm
if errorlevel 1 goto errasm

if not exist rsrc.obj goto nores

\masm32\bin\Link /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV %1.obj rsrc.obj
if errorlevel 1 goto errlink

It builded my source file.Also .pdb and .ilk files produced after build.I copied these file to SoftICE directory and made a batch file named debug.bat like below


nmsym /translate:source,package,always /source:. /load:execute,break %1

I run debug.bat proj1.exe and it said that


MODULE=proj1.exe
SOURCE=.
PROMPT=OFF
Translation of C:\Program Files\NuMega\SoftIce95\proj1.exe successfully compl
eted
Translation of C:\Program Files\NuMega\SoftIce95\proj1.exe successfully compl
eted
Loading symbols for C:\Program Files\NuMega\SoftIce95\proj1.exe
Unable to load symbols for C:\Program Files\NuMega\SoftIce95\proj1.NMS: The s
ystem cannot find the file specified.

Only uggly vay I have found is to make MAP file with /MAP: switch also and and built with above parameters.Then convert this map file to sym file.I can see my source code with comments but cant bpx on my varibles or even the apis I used :(
Posted on 2001-11-04 11:44:21 by LaptoniC
First off, you may need some of the following too:
/Zd - Add line number debug info
/Zf - Make all symbols public
/FR - Generate full browser info (not sure on this one)

On the linker you may also want to try:
/DEBUGTYPE:COFF as it is a coff object you are linking (not sure on this one)
/MAP & /MAPINFO
/PDB

I will try getting a file running tonight at home, and tell you how in the morning. I have done it before, but cannot remember how (must be getting forgetful in my old age) :grin: .

Mirno
Posted on 2001-11-05 03:59:51 by Mirno
I'm using the M$ WinDBG symbolic debugger which can be downloaded for free from Win Debugger (V3.0.20.0, 6.2 MB).

To build the debug version of my ASM sources I use a batch file which is called from the tools menu of RadAsm IDE (superb tool) :alright:

The make release / debug calls and the start of the debugger I placed in the Tools menu section in RadAsm ( see archive below ).

PiT
Posted on 2001-11-12 18:15:26 by PiT
rem DEBUG
\masm32\bin\rc /v rsrc.rc
\masm32\bin\ml /c /coff /Cp /nologo /Zi *.asm /map
\masm32\bin\link /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /MAP *.obj *.res

Then you can translate the symbol info in the .exe with softice symbol loader
Posted on 2001-11-12 20:48:34 by grv575
Thanks for your responses.I have tried both solutions and softice loader allways said An error occured during symbol translation/load.Load executable anyway?
Posted on 2001-11-13 16:13:38 by LaptoniC
Be sure your source file is in same directory as the exe.
Posted on 2001-11-14 03:02:34 by japheth
All files in the same directory.Still no luck.
Posted on 2001-11-14 06:42:20 by LaptoniC
Unzip to C:\Debug

Change patch to SoftICE directory in debug.bat
Mine is C:\SIW\

Run BuildLoad

It's almost as yours.
For me it's work fine.

Hope it helps.
Posted on 2001-11-15 05:10:48 by Four-F
it always says


MODULE=proj1.exe
SOURCE=.
PROMPT=OFF
Translation of C:\Program Files\NuMega\SoftIce95\proj1.exe successfully compl
eted
Translation of C:\Program Files\NuMega\SoftIce95\proj1.exe successfully compl
eted
Loading symbols for C:\Program Files\NuMega\SoftIce95\proj1.exe
Unable to load symbols for C:\Program Files\NuMega\SoftIce95\proj1.NMS: The s
ystem cannot find the file specified.


What is the version of you linker and ml ?I have the ones which comes with masm32
Posted on 2001-11-16 04:38:55 by LaptoniC
some of the tools don't like spaces in the path
try moving your project to say c:\masm32\code\project1
Posted on 2001-11-16 20:20:34 by grv575
Try do this:

Compile: Link /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV %1.obj

Don't make *.NMS with nmsym.exe

Run Symbol Loader \SoftICE Path\loader32.exe
Open your compiled xxx.exe File -> Open Module...
Than Module -> Translate

Symbol Loader will translate your xxx.exe's debug information into a xxx.NMS symbol file.

You'll see in Loader's window:
=========================
C:\....\xxx.exe opened successfully
Translating C:\....\xxx.exe. . .
Translation of C:\....\xxx.exe successfully completed


And xxx.NMS is in xxx.exe's path.

Than load into Sice Module -> Load

If it'll work. You can make load.bat:
C:\SIW\Loader32.exe /LOAD %1.exe
and don't use nmsym.exe at all.

load xxx - will translate debug information and load your xxx.exe into SoftIce.

Later you can remove a symbol table:
Edit -> Symbol Tables?

Read Symbol Loader's Help carefully


If it'll not work. So i suggest to reinstall SoftIce to another directory.
Path shoul be with short names (<=8 chars) and without spaces.
I always use C:\SIW\

Or you can try to copy nmsym.exe to another simple path without spaces,
and change your debug.bat.

Hope something will help.

PS:
Microsoft (R) Macro Assembler Version 6.15.8803
Microsoft (R) Incremental Linker Version 5.12.8078
Posted on 2001-11-18 08:41:00 by Four-F