Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

debugxv - how to use I/O watchpoint? (Users)

posted by tom Homepage, Germany (West), 10.04.2025, 18:27
(edited by tom on 10.04.2025, 19:29)

> > While true for the debug registers, the CPU also supports the I/O map
> where
> > for
> > every I/O address you can define allowed or disallowed.
>
> Well, since we're now at the state of "claiming the obvious": the IO
> permission bitmap won't work in real-mode or PL0 protected-mode. In
> protected-mode PL3 it requires IOPL < 3.

True. It would require some sort of cooperation from JEMM386.

> > Debuggers like SoftICE have supported this for ages...
>
> Thanks for the promotion... I once tried it and was disappointed ( can't
> remember why, but most likely because it didn't support protected-mode ).
True. SoftICE was one of the first protected mode programs x386 *at all* (and I was one of the first few customers of it for amazing €386).

It only learned to debug protected mode programs as SoftICE/W for Windows, many years later.

In it's form for real mode/VM it was an extremely powerfull debugger; parts of it still not seen anywhere else. Like

BPX 60:123 "break if 60:123 is executed" (the first 4 using debug registers,
more using INT3)

BPX 4321:1234 5000:0 TW
"trace execution in a certain address range if instruction executes a write operation" (implemented by setting no-execute
for some pages, filtering actual interrupts by CS:IP)

BPDW 123:4320 "breakpoint if DW 123:4320 is Written" (or read or accessed)

BPIO 3F8 RW
"trace I/O address 3F8 access (read, write, or read/write)

BPINT 3F AH=17
"break on interrupt 31 if AH==17"

where "trace" meant "keep the last few thousand instructions and register content in store for the moment execution breaks"

that's how I found bugs in foreign programs, corrupting MCB structures

and many more ...

It was even available for WinNT, used to debug the Windows kernel and drivers.
Quite pricy at almost 2K$, but worth every cent if you value your time != zero.

Edited to add All the tracing was done in "close to normal speed", i.e. it wasn't single stepping in software, but used 386 features to run even "trace everything inside the kernel (and only the kernel) until you hit INT13/write sector or access some I/O address" in close to normal speed.

 

Complete thread:

Back to the forum
Board view  Mix view
22477 Postings in 2087 Threads, 400 registered users, 113 users online (1 registered, 112 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum