Reactos
at master 78 lines 1.8 kB view raw
1/* 2 * PROJECT: ReactOS Kernel 3 * LICENSE: BSD - See COPYING.ARM in the top level directory 4 * FILE: lib/rtl/arm/debug_asm.S 5 * PURPOSE: Cross-privilege Debugging and Exception Support for ARM 6 * PROGRAMMERS: ReactOS Portable Systems Group 7 */ 8 9#include <ksarm.h> 10 11 TEXTAREA 12 13 LEAF_ENTRY DbgBreakPoint 14 __debugbreak 15 bx lr 16 LEAF_END DbgBreakPoint 17 18 LEAF_ENTRY DbgUserBreakPoint 19 __debugbreak 20 bx lr 21 LEAF_END DbgUserBreakPoint 22 23 LEAF_ENTRY DbgBreakPointWithStatus 24 ALTERNATE_ENTRY RtlpBreakWithStatusInstruction 25 __debugbreak 26 bx lr 27 LEAF_END 28 29 LEAF_ENTRY DebugService 30 __debugservice 31 //bkpt BREAKPOINT_PRINT // Could be prompt too, we check this later 32 bx lr 33 LEAF_END DebugService 34 35 LEAF_ENTRY DebugService2 36 //bkpt BREAKPOINT_LOAD_SYMBOLS // Could be unload too, we check this later 37 bx lr 38 LEAF_END DebugService2 39 40 LEAF_ENTRY RtlCaptureContext 41 42 // FIXME-PERF: Change to stmdb later 43 str r0, [a1, #CxR0] 44 str r1, [a1, #CxR1] 45 str r2, [a1, #CxR2] 46 str r3, [a1, #CxR3] 47 str r4, [a1, #CxR4] 48 str r5, [a1, #CxR5] 49 str r6, [a1, #CxR6] 50 str r7, [a1, #CxR7] 51 str r8, [a1, #CxR8] 52 str r9, [a1, #CxR9] 53 str r10, [a1, #CxR10] 54 str r11, [a1, #CxR11] 55 str r12, [a1, #CxR12] 56 57 str sp, [a1, #CxSp] 58 str lr, [a1, #CxLr] 59 60 /* Need to do this indirectly, since "str pc, [a1, #CxPc]" generates 61 unpredictable behavior (error A2193) */ 62 mov ip, pc 63 str ip, [a1, #CxPc] 64 mrs ip, spsr 65 str ip, [a1, #CxCpsr] 66 67 // FIXME: Fpscr and remaining stuff 68 69 /* Set flags */ 70 mov32 r0, #CONTEXT_FULL 71 str ip, [a1, #CxContextFlags] 72 73 /* Return */ 74 bx lr 75 LEAF_END RtlCaptureContext 76 77 END 78/* EOF */