ReactOS  r76032
trace.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void DeInstallTraceHook (void)
 
BOOLEAN InstallTraceHook (void)
 
void NewInt1Handler (void)
 

Variables

volatile ULONG OldInt1Handler
 

Function Documentation

void DeInstallTraceHook ( void  )

Definition at line 80 of file trace.c.

Referenced by CleanUpPICE().

81 {
82  DPRINT((0,"DeInstallTraceHook(OldInt1Handler=%0.8x)...\n",OldInt1Handler));
83 
84  MaskIrqs();
85  if(OldInt1Handler)
86  {
88  OldInt1Handler = 0;
89  }
90  UnmaskIrqs();
91 }
ULONG SetGlobalInt(ULONG dwInt, ULONG NewIntHandler)
Definition: hooks.c:95
void DPRINT(...)
Definition: polytest.cpp:61
void MaskIrqs(void)
Definition: hooks.c:68
volatile ULONG OldInt1Handler
Definition: trace.c:40
unsigned int ULONG
Definition: retypes.h:1
void UnmaskIrqs(void)
Definition: hooks.c:82
BOOLEAN InstallTraceHook ( void  )

Definition at line 42 of file trace.c.

Referenced by InitPICE().

43 {
44  ULONG LocalInt1Handler;
45 
46  DPRINT((0,"InstallTraceHook(OldInt1Handler=%0.8x)...\n",OldInt1Handler));
47 
48  MaskIrqs();
49  if(!OldInt1Handler)
50  {
51  __asm__("mov $NewInt1Handler,%0"
52  :"=r" (LocalInt1Handler)
53  :
54  :"eax");
55  OldInt1Handler=SetGlobalInt(0x01,(ULONG)LocalInt1Handler);
56  }
57  UnmaskIrqs();
58  return TRUE;
59 }
#define TRUE
Definition: types.h:120
ULONG SetGlobalInt(ULONG dwInt, ULONG NewIntHandler)
Definition: hooks.c:95
__asm__("\n\t \ NewInt1Handler:\n\t \ pushl %eax\n\t \ movl %dr6,%eax\n\t \ testl $(1<<14),%eax\n\t \ jz exceptionnotsinglestep\n\t \ \n\t \ popl %eax\n\t \ pushl $"STR(REASON_SINGLESTEP)"\n\t \ jmp NewInt31Handler\n\t \ \n\t \ exceptionnotsinglestep:\n\t \ popl %eax\n\t \ pushl $"STR(REASON_HARDWARE_BP)"\n\t \ jmp NewInt31Handler\n\t \ ")
void DPRINT(...)
Definition: polytest.cpp:61
void MaskIrqs(void)
Definition: hooks.c:68
volatile ULONG OldInt1Handler
Definition: trace.c:40
unsigned int ULONG
Definition: retypes.h:1
void UnmaskIrqs(void)
Definition: hooks.c:82
void NewInt1Handler ( void  )

Variable Documentation

volatile ULONG OldInt1Handler

Definition at line 40 of file trace.c.

Referenced by DeInstallTraceHook(), and InstallTraceHook().