mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 21:52:59 +00:00
[NTVDM]: Implement BOP_DEBUGGER (see: "Undocumented DOS" by Schulman et al., page 267) which allows you to break into a debugger from a 16-bit app (Vampyre, it can be useful for you ;) ).
svn path=/branches/ntvdm/; revision=61282
This commit is contained in:
parent
085fe5e31a
commit
49b672d829
1 changed files with 12 additions and 0 deletions
|
@ -24,6 +24,9 @@ FAST486_STATE EmulatorContext;
|
||||||
|
|
||||||
static BOOLEAN A20Line = FALSE;
|
static BOOLEAN A20Line = FALSE;
|
||||||
|
|
||||||
|
/* BOP Identifiers */
|
||||||
|
#define BOP_DEBUGGER 0x56 // Break into the debugger from a 16-bit app
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* PRIVATE FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
VOID WINAPI EmulatorReadMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
|
VOID WINAPI EmulatorReadMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
|
||||||
|
@ -91,6 +94,12 @@ UCHAR WINAPI EmulatorIntAcknowledge(PFAST486_STATE State)
|
||||||
return PicGetInterrupt();
|
return PicGetInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID WINAPI EmulatorDebugBreak(LPWORD Stack)
|
||||||
|
{
|
||||||
|
DPRINT1("NTVDM: BOP_DEBUGGER\n");
|
||||||
|
DebugBreak();
|
||||||
|
}
|
||||||
|
|
||||||
/* PUBLIC FUNCTIONS ***********************************************************/
|
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||||
|
|
||||||
BOOLEAN EmulatorInitialize(VOID)
|
BOOLEAN EmulatorInitialize(VOID)
|
||||||
|
@ -113,6 +122,9 @@ BOOLEAN EmulatorInitialize(VOID)
|
||||||
/* Enable interrupts */
|
/* Enable interrupts */
|
||||||
setIF(1);
|
setIF(1);
|
||||||
|
|
||||||
|
/* Register the DebugBreak BOP */
|
||||||
|
RegisterBop(BOP_DEBUGGER, EmulatorDebugBreak);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue