Changeset b53ad46 in rtems


Ignore:
Timestamp:
Apr 14, 2017, 7:12:44 AM (2 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
18f63c0
Parents:
50b1269
git-author:
Chris Johns <chrisj@…> (04/14/17 07:12:44)
git-committer:
Chris Johns <chrisj@…> (04/14/17 22:18:25)
Message:

libdebugger: Work around assert when using _Thread_Executing.

Using _Thread_Executing with RTEMS_DEBUG results in an assert if
the server accesses invalid memory.

Updates #2993.

Location:
cpukit/libdebugger
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdebugger/rtems-debugger-arm.c

    r50b1269 rb53ad46  
    718718    "str  r3, [r2]\n"                 /* clear the FPU frame pointer */ \
    719719    EXCEPTION_ENTRY_FPU(frame_fpu_size)                                 \
    720     "msr  cpsr, r1\n"                        /* restore the irq mask */ \
     720    "bic  r1, r1, %[psr_i]\n"        /* clear irq mask, debug checks */ \
     721    "msr  cpsr, r1\n"       /* restore the state with irq mask clear */ \
    721722    ASM_THUMB_MODE                                                      \
    722723    : ARM_SWITCH_REG_ASM,                                               \
  • cpukit/libdebugger/rtems-debugger-target.c

    r50b1269 rb53ad46  
    285285  if (!rtems_interrupt_is_in_progress()) {
    286286    rtems_debugger_threads*              threads = rtems_debugger->threads;
    287     Thread_Control*                      thread = _Thread_Executing;
     287    #if USE_THREAD_EXECUTING
     288     Thread_Control*                     thread = _Thread_Executing;
     289    #else
     290     const Per_CPU_Control*              cpu = _Per_CPU_Get_snapshot();
     291     Thread_Control*                     thread = _Per_CPU_Get_executing(cpu);
     292    #endif
    288293    rtems_id*                            excludes;
    289294    const rtems_id                       tid = thread->Object.id;
Note: See TracChangeset for help on using the changeset viewer.