Implement DbgUserBreakPoint and DbgBreakPointWithStatus on ARM

svn path=/trunk/; revision=67643
This commit is contained in:
Timo Kreuzer 2015-05-10 21:05:01 +00:00
parent c7e9f9e06c
commit acfb380603

View file

@ -10,72 +10,73 @@
TEXTAREA TEXTAREA
NESTED_ENTRY DbgBreakPoint LEAF_ENTRY DbgBreakPoint
PROLOG_END DbgBreakPoint __debugbreak
//
// Do a breakpoint and return
//
bkpt BREAKPOINT_BREAK
bx lr bx lr
ENTRY_END DbgBreakPoint LEAF_END DbgBreakPoint
NESTED_ENTRY DebugService LEAF_ENTRY DbgUserBreakPoint
PROLOG_END DebugService __debugbreak
//
// Do a breakpoint and return
//
bkpt BREAKPOINT_PRINT // Could be prompt too, we check this later
bx lr bx lr
ENTRY_END DebugService LEAF_END DbgUserBreakPoint
NESTED_ENTRY DebugService2 LEAF_ENTRY DbgBreakPointWithStatus
PROLOG_END DebugService2 __debugbreak
bx lr
LEAF_END
// LEAF_ENTRY RtlpBreakWithStatusInstruction
// FIXME-TODO: Do a breakpoint and return __debugbreak
// bx lr
LEAF_END
LEAF_ENTRY DebugService
__debugservice
//bkpt BREAKPOINT_PRINT // Could be prompt too, we check this later
bx lr
LEAF_END DebugService
LEAF_ENTRY DebugService2
//bkpt BREAKPOINT_LOAD_SYMBOLS // Could be unload too, we check this later //bkpt BREAKPOINT_LOAD_SYMBOLS // Could be unload too, we check this later
bx lr bx lr
ENTRY_END DebugService2 LEAF_END DebugService2
NESTED_ENTRY RtlCaptureContext LEAF_ENTRY RtlCaptureContext
PROLOG_END RtlCaptureContext
//
// FIXME-PERF: Change to stmdb later // FIXME-PERF: Change to stmdb later
// str r0, [a1, #CxR0]
str r0, [a1, #CsR0] str r1, [a1, #CxR1]
str r1, [a1, #CsR1] str r2, [a1, #CxR2]
str r2, [a1, #CsR2] str r3, [a1, #CxR3]
str r3, [a1, #CsR3] str r4, [a1, #CxR4]
str r4, [a1, #CsR4] str r5, [a1, #CxR5]
str r5, [a1, #CsR5] str r6, [a1, #CxR6]
str r6, [a1, #CsR6] str r7, [a1, #CxR7]
str r7, [a1, #CsR7] str r8, [a1, #CxR8]
str r8, [a1, #CsR8] str r9, [a1, #CxR9]
str r9, [a1, #CsR9] str r10, [a1, #CxR10]
str r10, [a1, #CsR10] str r11, [a1, #CxR11]
str r11, [a1, #CsR11] str r12, [a1, #CxR12]
str r12, [a1, #CsR12]
str sp, [a1, #CsSp] str sp, [a1, #CxSp]
str lr, [a1, #CsLr] str lr, [a1, #CxLr]
// str pc, [a1, #CsPc] // FIXME: error A2193: this instruction generates unpredictable behavior
/* Need to do this indirectly, since "str pc, [a1, #CxPc]" generates
unpredictable behavior (error A2193) */
mov ip, pc
str ip, [a1, #CxPc]
mrs ip, spsr mrs ip, spsr
str ip, [a1, #CsCpsr] str ip, [a1, #CxCpsr]
// // FIXME: Fpscr and remaining stuff
// Set flags
//
mov ip, #CONTEXT_FULL
str ip, [a1, #CsContextFlags]
// /* Set flags */
// Return mov32 r0, #CONTEXT_FULL
// str ip, [a1, #CxContextFlags]
/* Return */
bx lr bx lr
ENTRY_END RtlCaptureContext LEAF_END RtlCaptureContext
END END
/* EOF */ /* EOF */