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
9Module Name:
10
11 include/pal/debug.h
12
13Abstract:
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
25extern "C"
26{
27#endif // __cplusplus
28
29/*++
30Function :
31 DBG_DebugBreak
32
33 Processor-dependent implementation of DebugBreak
34
35(no parameters, no return value)
36--*/
37extern "C" VOID
38DBG_DebugBreak();
39
40/*++
41Function:
42 IsInDebugBreak(addr)
43
44 Returns true if the address is in DBG_DebugBreak.
45
46--*/
47BOOL
48IsInDebugBreak(void *addr);
49
50/*++
51Function :
52 DBG_FlushInstructionCache
53
54 Processor-dependent implementation of FlushInstructionCache
55
56Parameters :
57 LPCVOID lpBaseAddress: start of region to flush
58 SIZE_T dwSize : length of region to flush
59
60Return value :
61 TRUE on success, FALSE on failure
62
63--*/
64BOOL
65DBG_FlushInstructionCache(
66 IN LPCVOID lpBaseAddress,
67 IN SIZE_T dwSize);
68
69#if defined(__APPLE__)
70/*++
71Function:
72 DBG_CheckStackAlignment
73
74 The Apple ABI requires 16-byte alignment on the stack pointer.
75 This function traps/interrupts otherwise.
76--*/
77VOID
78DBG_CheckStackAlignment();
79#endif
80
81
82#ifdef __cplusplus
83}
84#endif // __cplusplus
85
86#endif //PAL_DEBUG_H_
87