mirror of
https://github.com/reactos/reactos.git
synced 2024-08-30 23:28:58 +00:00
- Implement restoring DRx registers if the thread is being debugged.
svn path=/trunk/; revision=33597
This commit is contained in:
parent
8ee5bedcd5
commit
9cc4675c59
|
@ -318,6 +318,8 @@ CheckDebug:
|
||||||
test byte ptr [eax+KTHREAD_DEBUG_ACTIVE], 0xFF
|
test byte ptr [eax+KTHREAD_DEBUG_ACTIVE], 0xFF
|
||||||
jnz RestoreDebug
|
jnz RestoreDebug
|
||||||
|
|
||||||
|
RestoreStack:
|
||||||
|
|
||||||
/* Get TSS */
|
/* Get TSS */
|
||||||
mov edx, fs:[KPCR_TSS]
|
mov edx, fs:[KPCR_TSS]
|
||||||
|
|
||||||
|
@ -379,10 +381,25 @@ NotV86:
|
||||||
jmp CheckDebug
|
jmp CheckDebug
|
||||||
|
|
||||||
RestoreDebug:
|
RestoreDebug:
|
||||||
|
/* Get a pointer to thread's trap frame */
|
||||||
|
mov esi, [eax+KTHREAD_TRAP_FRAME]
|
||||||
|
|
||||||
/* Not yet supported */
|
/* Copy debug registers data from it */
|
||||||
int 3
|
mov edx, [esi+KTRAP_FRAME_DR0]
|
||||||
jmp $
|
mov [edi+KTRAP_FRAME_DR0], edx
|
||||||
|
mov edx, [esi+KTRAP_FRAME_DR1]
|
||||||
|
mov [edi+KTRAP_FRAME_DR1], edx
|
||||||
|
mov edx, [esi+KTRAP_FRAME_DR2]
|
||||||
|
mov [edi+KTRAP_FRAME_DR2], edx
|
||||||
|
mov edx, [esi+KTRAP_FRAME_DR3]
|
||||||
|
mov [edi+KTRAP_FRAME_DR3], edx
|
||||||
|
mov edx, [esi+KTRAP_FRAME_DR6]
|
||||||
|
mov [edi+KTRAP_FRAME_DR6], edx
|
||||||
|
mov edx, [esi+KTRAP_FRAME_DR7]
|
||||||
|
mov [edi+KTRAP_FRAME_DR7], edx
|
||||||
|
|
||||||
|
/* Jump back */
|
||||||
|
jmp RestoreStack
|
||||||
|
|
||||||
NoStack:
|
NoStack:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue