DOS kernel debugging (Announce)
> Hello,
>
> while playing with the "boot" variant of Debug, I realized that the MS-DOS
> v7.1 kernel ( Win 98 SE ) can be convinced of not touching interrupt
> vectors 1 and 3 if signature "JP" is located at [CS:IP-2] of vector 1. Thus
> the debugger remains active until the cmd prompt appears.
>
> Is this some kind of "standard", also used by other DOS kernel variants?
> Found nothing about that in RBIL.
This is the first I hear of it. Usually I patch the kernel, eg lDOS patchdeb or FreeDOS kernel config "CheckDebugger" setting, or a binary patch for MS-DOS kernels without sources.
When running without such a patch, a bootable lDebug command like tp FFFFFF while ! value from linear 0:1 * 4 length 3 * 4 in writing silent 1
does it. This command traces the kernel until it gets to an instruction that's about to write to the IVT entries for int 1, 2, or 3. This is usually a mov
or stosw
. Crucially, this returns control to the debugger terminal before executing the instruction that would write to the IVT. It does rely on the kernel not calling an interrupt service to do its IVT writes, or we might need to enable Trace Mode.
---
l
Complete thread:
- DOS kernel debugging - Japheth, 29.04.2025, 05:14 (Announce)
- DOS kernel debugging - ecm, 29.04.2025, 09:59
- DOS kernel debugging - Japheth, 30.04.2025, 08:20
- DOS kernel debugging - ecm, 29.04.2025, 09:59