summaryrefslogtreecommitdiffstats
path: root/cpukit/libdebugger/rtems-debugger-target.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libdebugger/rtems-debugger-target.c')
-rw-r--r--cpukit/libdebugger/rtems-debugger-target.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/libdebugger/rtems-debugger-target.c b/cpukit/libdebugger/rtems-debugger-target.c
index cd1565463e..65b878469d 100644
--- a/cpukit/libdebugger/rtems-debugger-target.c
+++ b/cpukit/libdebugger/rtems-debugger-target.c
@@ -284,7 +284,12 @@ rtems_debugger_target_exception(CPU_Exception_frame* frame)
if (!rtems_interrupt_is_in_progress()) {
rtems_debugger_threads* threads = rtems_debugger->threads;
- Thread_Control* thread = _Thread_Executing;
+ #if USE_THREAD_EXECUTING
+ Thread_Control* thread = _Thread_Executing;
+ #else
+ const Per_CPU_Control* cpu = _Per_CPU_Get_snapshot();
+ Thread_Control* thread = _Per_CPU_Get_executing(cpu);
+ #endif
rtems_id* excludes;
const rtems_id tid = thread->Object.id;
DB_UINT pc;