Ignore:
Timestamp:
Nov 2, 2007, 1:35:02 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
137c410
Parents:
7cb1d6ea
Message:

2007-11-02 Joel Sherrill <joel.sherrill@…>

  • score/cpu/sparc/cpu.c, score/cpu/sparc/rtems/score/cpu.h, score/include/rtems/score/context.h, score/src/threadhandler.c: Fix stack so gdb backtrace does not print corrupted frame message after _Thread_Handler. Daniel Hellstrom <daniel@…> provided the SPARC implementation and I made it more general.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    r7cb1d6ea r48816d7  
    792792
    793793/*
     794 *  This macro is invoked from _Thread_Handler to do whatever CPU
     795 *  specific magic is required that must be done in the context of
     796 *  the thread when it starts.
     797 *
     798 *  On the SPARC, this is setting the frame pointer so GDB is happy.
     799 *  Make GDB stop unwinding at _Thread_Handler, previous register window
     800 *  Frame pointer is 0 and calling address must be a function with starting
     801 *  with a SAVE instruction. If return address is leaf-function (no SAVE)
     802 *  GDB will not look at prev reg window fp.
     803 *
     804 *  _Thread_Handler is known to start with SAVE.
     805 */
     806
     807#define _CPU_Context_Initialization_at_thread_begin() \
     808  do { \
     809    asm volatile ("set _Thread_Handler,%%i7\n"::); \
     810  } while (0)
     811
     812/*
    794813 *  This routine is responsible for somehow restarting the currently
    795814 *  executing task. 
Note: See TracChangeset for help on using the changeset viewer.