Hey,

Here is what I have been trying to do for the last week.

I want to find out where the data vars are located in RAM when I am debugging. On a console system like the Gameboy what you do is export the map file. Lets you know where to find a certain symbol in RAM when the game is being debugged.

I am trying to get the same information using Masm/Link. I have found the /MAP directive. It exports the function names in the linked module. And even tells you where they are located in memory. It doesn't however tell you where you data section vars are located. Or even indicate their names.

This is what I need. Or if you guys know of a better debugging solution. I find it difficult to track RAM overflow / overwrite errors when you can't look at your data vars while stepping through the code. If I knew where these vars are located then I could check their values for "correctness". I use OllyDbg as the debugger(unfortunately it doesn't support symbols). I do have softice, never used it. Don't know if it displays the symbol information to you?

Any info appreciated


thanx
Posted on 2002-04-15 12:57:26 by Rockinronstar
Hi;
If you want to use *.map files with softice. Use "MSYM.exe" util under "UTIL16" of softice folder.

You can use it like:

MSYM Myprog.map

and it will convert it to "myprog.sym" and you will use .sym files with softice's loader. Just open .sym file with loader32 and press translate button. thats all. You have your symbolic information for your program. :) You can see every label,call,varible and const information.
I used this tech before a lot of time. I hope you understand my words. My english still bad.

Regards.

I am learning, I will teach.
Posted on 2002-04-15 19:05:56 by RvaZero
i forget;
If you want to create map files just compile your program with DEBUG info.You can use RadASM or other IDE for this. I think ML /? and link /? is good enough for information.

If you see only your source in softice use SRC command to change mode.

Regards again
Posted on 2002-04-15 19:14:41 by RvaZero
You can also avoid using symbol loader by making a .bat file with something like:




rem del *.nms
\masm32\bin\ml /c /coff /Cp /Zi /nologo /Ic:\masm32\include program.asm > out.txt
\masm32\bin\link /SUBSYSTEM:WINDOWS /debug /LIBPATH:c:\masm32\lib program.obj >> out.txt
"\Program Files\NuMega\SoftIce95\nmsym.exe" /SYMLOAD:program.exe program.exe >> out.txt



think you might have to delete the symbol file to get the symbols to be reloaded
Posted on 2002-04-19 15:49:34 by grv575