mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[SOFT386]
Fix a bug in Soft386ExceptionWithErrorCode. The instruction pointer exceptions can return to should point to the instruction that caused the exception. svn path=/branches/ntvdm/; revision=60603
This commit is contained in:
parent
b22da55f8f
commit
800969b126
3 changed files with 7 additions and 1 deletions
|
@ -319,7 +319,7 @@ struct _SOFT386_STATE
|
|||
SOFT386_BOP_PROC BopCallback;
|
||||
SOFT386_REG GeneralRegs[SOFT386_NUM_GEN_REGS];
|
||||
SOFT386_SEG_REG SegmentRegs[SOFT386_NUM_SEG_REGS];
|
||||
SOFT386_REG InstPtr;
|
||||
SOFT386_REG InstPtr, SavedInstPtr;
|
||||
SOFT386_FLAGS_REG Flags;
|
||||
SOFT386_TABLE_REG Gdtr, Idtr, Ldtr, Tss;
|
||||
ULONGLONG TimeStampCounter;
|
||||
|
|
|
@ -469,6 +469,9 @@ Soft386ExceptionWithErrorCode(PSOFT386_STATE State,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Restore the IP to the saved IP */
|
||||
State->InstPtr = State->SavedInstPtr;
|
||||
|
||||
if (!Soft386GetIntVector(State, ExceptionCode, &IdtEntry))
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -56,6 +56,9 @@ Soft386ExecutionControl(PSOFT386_STATE State, INT Command)
|
|||
/* Main execution loop */
|
||||
do
|
||||
{
|
||||
/* If this is a new instruction, save the IP */
|
||||
if (State->PrefixFlags == 0) State->SavedInstPtr = State->InstPtr;
|
||||
|
||||
/* Perform an instruction fetch */
|
||||
if (!Soft386FetchByte(State, &Opcode)) continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue