Skip to content

Commit 27744cc

Browse files
authored
Add new API DebugSessionIsActive() (#3043)
1 parent 86578a0 commit 27744cc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/HAL/Include/nanoHAL_v2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ extern "C"
227227
// target specific handler for power mode changes (may be empty)
228228
void CPU_SetPowerModeTarget(PowerLevel_type powerLevel);
229229
bool DebuggerIsConnected();
230+
bool DebugSessionIsActive();
230231

231232
#ifdef __cplusplus
232233
}

src/HAL/nanoHAL_SystemInformation.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,10 @@ bool DebuggerIsConnected()
6969
{
7070
return ((g_CLR_RT_ExecutionEngine.m_iDebugger_Conditions & CLR_RT_ExecutionEngine::c_fDebugger_Enabled) != 0);
7171
}
72+
73+
bool DebugSessionIsActive()
74+
{
75+
return (
76+
(g_CLR_RT_ExecutionEngine.m_iDebugger_Conditions & CLR_RT_ExecutionEngine::c_fDebugger_SourceLevelDebugging) !=
77+
0);
78+
}

0 commit comments

Comments
 (0)