Log in

View Full Version : Sice: Source & Symbolic Level Debugging ???


Clandestiny
January 29th, 2001, 23:07
Hi All,

I am writing a program in C++ and I was wondering about the possibilites of source and symbolic debugging in Sice. I have looked over some documentation on +Sandman's SoftICE Resource Centre, but I'm a still a little puzzled on how to apply it. The tut I read mentions "linking the program w/ switches to create a .map file" and then using Sice's msym.exe to create the symbol file. I am using Visual C++ and cannot figure out how to get this .map file. I checked all of the files created from compiling including the debug directory and did not see anything. I also did a search through the VC++ msdn help files, but did not find anything relevant. Possibly I have overlooked something? And I would be appreciative to anyone who could clarify this for me / point to some more docs discussing source debugging w/ SICE.

Thanks,
Clandestiny

DinDon
January 30th, 2001, 04:05
Simply link your project with the debug info from VC++.
Next run NuMega SoftICE/Symbol Loader and open your executable module. Click the Load command on the menu, then Load subcommand.

This will have two effects: a Translate command (which will create a file with extension .NMS from your executable, containing all the symbols and optionally the source files - click on the Book icon on the toolbar to include them) and the loading and execution of all required files in memory, performing a breakpoint on the first source line.

Have fun

(by the way, I do not like very much this way of debugging my programs, because the computer is blocked during the debug, and you cannot run any other app; but it may come useful when debugging the programs on a machine without M$ Studio installed: you just need SICE, your exe and the .NMS file, built on the machine with the sources. Note that the .NMS format is not dependent on the operating system, so you could develop a program under WinNT and test it an Win2k, for example)

Lord Soth
January 30th, 2001, 18:10
Hiya dude,

All you need to do is compile your project for debug and not release.
If I remember correctly, this is the default behaviour of VC++ so it shouldn't be a problem.
In the project configuration dialog you can set debug or release compilation.
Once you have it, just load up your new exe with the symbol loader and it should do everything for you.
I suggest using the locals window (command: wl, which shows a function's local vars), and
possibly wf if you have floating point calculations there..
Notice you can use F3 (by default unless you've changed it) to switch to source, mixed and asm modes of debugging.
setting a BP is very easy too, just BPX .1234, will put a BPX on line 1234 for example.
I really suggest you read the SI manual on source level debugging. VC++'s debugger is a joke in comparison, trust me

LS

Clandestiny
January 30th, 2001, 23:19
Lord Soth & DinDon,

Thanks both of you for your help :-)

I fixed the problem. After reading your feedback and having a closer look at the SICE manual, I realized that VC++ creates the .NMS file all by itself whenever a project is compiled. It was just a matter of telling SICE to load it inside the initialization settings.

I must say, its pretty cool to see my source code sitting right there in SoftICE! And even with just a cursory glance, IMO it already appears to run much smoother than the M$ VC++ debugger.

Guess I'll finally attempt to use SICE for what it was intended for in the first place ...LOL

Cheers,
Clandestiny

Lord Soth
February 1st, 2001, 20:19
IMO the best way to debug things you really don't understand is using mixed source mode.
What this gives you is not only seeing the
source code that is running. Look also at the registers themselves, which gives a great insight

Have fun dude

PS. get the damn SI manual! it's priceless!!
If you can't find it, mail me.

LS

?ferret
February 2nd, 2001, 23:15
I agree w/ LS that the VC++ debugger is crap. I DO use it sometimes if I just need to check a simple value, but if I don't have a pretty good idea of what's wrong before I start it, it's worthless.... ;-)

(Off topic, but I had to put my 2 cents worth in)

Clandestiny
February 2nd, 2001, 23:54
Lord Soth,

Thanks man for the advice! ...Yeah, mixed mode is great and I've already caught a couple of bugs with it.

As for the SI manual, I already have it but thanks for the kind offer...I just don't read it as often as I should

Cheers,
Clandestiny