Log in

View Full Version : Softice doesn't break on "int 21" in 16-bit code


zombie8
September 9th, 2004, 09:42
Hi

I'v been trying to debug a simple 16-bit "hello world" DOS program. When I load it into Softice (using dldr.exe from Util16 subdirectory) Softice pops up showing the program's code. The cursor is placed at the first instruction and the "int 21" instruction is just a couple of lines below. I input "bpint 21" and "g", the Softice window dissappears and the program terminates normally (i. e. printing "hello world". Why doesn't Softice break? The Softice User's Guide states that "bpint" can be used to trap software interrupts made by 16-bit programs. I have also tried to set a breakpoint on the interrupt handler but it didn't work either. I haven't found anything helpful in Internet, only some cracking tutorials that use "bpint 21" in Softice for Dos. And Softice for DOS does not start in a DOS box ("Soft-ICE can not run with other 80386 control programs". What am I doing wrong? I am using Softice 4.2.7 under Windows 2000 SP4.

Help will be greatly appreciated. It's been bothering me for quite a long time.

esther
September 9th, 2004, 10:15
Since its near to int21 you just need to trace using f7 or f8.

If you want to go to that address just use bpx xxxxxxxx and type x

zombie8
September 10th, 2004, 02:49
Quote:
[Originally Posted by esther]Since its near to int21 you just need to trace using f7 or f8.



Of course I can do that since the "int 21" instruction is near the beginning of the code. But what if it wasn't? I'd really like to know how to make Softice break on it. Another problem is, however, that Softice often hangs the system up when debugging 16-bit apps (this has been already reported on one of these forums). So if Softice can't break on interrupts, what are its advantages as compared to, say, Turbo Debugger for 16-bit apps? I thought things would work out in Softice for DOS, but it doesn't start on W2k. Does somebody have a clue on that?

Thanx in advance

Japheth
September 11th, 2004, 12:14
> I thought things would work out in Softice for DOS, but
> it doesn't start on W2k. Does somebody have a clue on
> that?

this cannot work because SIDOS is a DOS program which requires ring 0 access either by VCPI or by running in real mode. Both is not true for VDMs on NT platforms.

naides
September 11th, 2004, 14:34
When you are debugging a 16 bit app in a pure 32 bit environment you have the extra layer of complexity that you are tracing through a virtual machine. Sice gets lost rather easily because most of the interrupts are not actually called but emulated by the VM. I am not sure what you want to acomplish, but to be able to do what you want to do, set up your computer in a true blue DOS environment and use true DOS SoftIce.

zombie8
September 12th, 2004, 05:11
Thanx for your suggestions. I have tried out the 16-bit Turbo Debugger and I think it's more suitable for debugging 16-bit apps in a 32-bit environment then Softice.