Author: aandrejevic
Date: Sat Nov 9 15:48:07 2013
New Revision: 60897
URL:
http://svn.reactos.org/svn/reactos?rev=60897&view=rev
Log:
[NTVDM]
Display the opcode when an unhandled exception occurs.
Modified:
branches/ntvdm/subsystems/ntvdm/bop.c
Modified: branches/ntvdm/subsystems/ntvdm/bop.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bop.c?re…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/bop.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/bop.c [iso-8859-1] Sat Nov 9 15:48:07 2013
@@ -296,18 +296,31 @@
VOID WINAPI Exception(BYTE ExceptionNumber, LPWORD Stack)
{
WORD CodeSegment, InstructionPointer;
+ PBYTE Opcode;
ASSERT(ExceptionNumber < 8);
/* Get the CS:IP */
InstructionPointer = Stack[STACK_IP];
CodeSegment = Stack[STACK_CS];
+ Opcode = (PBYTE)SEG_OFF_TO_PTR(CodeSegment, InstructionPointer);
/* Display a message to the user */
- DisplayMessage(L"Exception: %s occured at %04X:%04X",
+ DisplayMessage(L"Exception: %s occured at %04X:%04X\n"
+ L"Opcode: %02X %02X %02X %02X %02X %02X %02X %02X %02X
%02X",
ExceptionName[ExceptionNumber],
CodeSegment,
- InstructionPointer);
+ InstructionPointer,
+ Opcode[0],
+ Opcode[1],
+ Opcode[2],
+ Opcode[3],
+ Opcode[4],
+ Opcode[5],
+ Opcode[6],
+ Opcode[7],
+ Opcode[8],
+ Opcode[9]);
/* Stop the VDM */
VdmRunning = FALSE;