1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | |
5 | /*++ |
6 | |
7 | |
8 | |
9 | Module Name: |
10 | |
11 | include/pal/debug.h |
12 | |
13 | Abstract: |
14 | |
15 | Debug API utility functions |
16 | |
17 | |
18 | |
19 | --*/ |
20 | |
21 | #ifndef _PAL_DEBUG_H_ |
22 | #define _PAL_DEBUG_H_ |
23 | |
24 | #ifdef __cplusplus |
25 | extern "C" |
26 | { |
27 | #endif // __cplusplus |
28 | |
29 | /*++ |
30 | Function : |
31 | DBG_DebugBreak |
32 | |
33 | Processor-dependent implementation of DebugBreak |
34 | |
35 | (no parameters, no return value) |
36 | --*/ |
37 | extern "C" VOID |
38 | DBG_DebugBreak(); |
39 | |
40 | /*++ |
41 | Function: |
42 | IsInDebugBreak(addr) |
43 | |
44 | Returns true if the address is in DBG_DebugBreak. |
45 | |
46 | --*/ |
47 | BOOL |
48 | IsInDebugBreak(void *addr); |
49 | |
50 | /*++ |
51 | Function : |
52 | DBG_FlushInstructionCache |
53 | |
54 | Processor-dependent implementation of FlushInstructionCache |
55 | |
56 | Parameters : |
57 | LPCVOID lpBaseAddress: start of region to flush |
58 | SIZE_T dwSize : length of region to flush |
59 | |
60 | Return value : |
61 | TRUE on success, FALSE on failure |
62 | |
63 | --*/ |
64 | BOOL |
65 | DBG_FlushInstructionCache( |
66 | IN LPCVOID lpBaseAddress, |
67 | IN SIZE_T dwSize); |
68 | |
69 | #if defined(__APPLE__) |
70 | /*++ |
71 | Function: |
72 | DBG_CheckStackAlignment |
73 | |
74 | The Apple ABI requires 16-byte alignment on the stack pointer. |
75 | This function traps/interrupts otherwise. |
76 | --*/ |
77 | VOID |
78 | DBG_CheckStackAlignment(); |
79 | #endif |
80 | |
81 | |
82 | #ifdef __cplusplus |
83 | } |
84 | #endif // __cplusplus |
85 | |
86 | #endif //PAL_DEBUG_H_ |
87 | |