DebuggerChecker.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef SYSPROGS_PROFILER_DEBUGGER_CHECK_MODE
4 
5 static bool CanInvokeSemihostingCalls()
6 {
7  return true;
8 }
9 
10 #else
11 #if SYSPROGS_PROFILER_DEBUGGER_CHECK_MODE
12 
13 static bool CanInvokeSemihostingCalls()
14 {
15  //Check the C_DEBUGEN bit in DHCSR
16  return *((unsigned *)0xE000EDF0) & 1;
17 }
18 
19 #else
20 
21 //Must be user-provided
22 bool CanInvokeSemihostingCalls();
23 #endif
24 
25 #endif