Changeset ba6f945a in rtems


Ignore:
Timestamp:
Jun 22, 2010, 7:59:35 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
e525f66
Parents:
71a3078
Message:

2010-06-22 Joel Sherrill <joel.sherrilL@…>

  • stackchk/blow.c, stackchk/stackchk.scn: Print a stack check report before blowing stack.
Location:
testsuites/libtests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/ChangeLog

    r71a3078 rba6f945a  
     12010-06-22      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * stackchk/blow.c, stackchk/stackchk.scn: Print a stack check report
     4        before blowing stack.
     5
    162010-06-22      Jennifer Averett <Jennifer.Averett@OARcorp.com>
    27
  • testsuites/libtests/stackchk/blow.c

    r71a3078 rba6f945a  
    1515
    1616#include <rtems.h>
     17#include <rtems/stackchk.h>
    1718
    1819void b(void) {}
     
    2930   */
    3031
    31  area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area;
     32  area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area;
    3233
    33  /* Look in the stack checker implementation for this magic offset */
    34  low  = (volatile uint32_t   *) (area + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE);
    35  high = (volatile uint32_t   *)
    36             (area + _Thread_Executing->Start.Initial_stack.size - 16);
     34  /* Look in the stack checker implementation for this magic offset */
     35  low  = (volatile uint32_t *) \
     36     (area + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE);
     37  high = (volatile uint32_t *)
     38             (area + _Thread_Executing->Start.Initial_stack.size - 16);
    3739
     40  low[0] = 0x11111111;
     41  low[1] = 0x22222222;
     42  low[2] = 0x33333333;
     43  low[3] = 0x44444444;
    3844
    39  low[0] = 0x11111111;
    40  low[1] = 0x22222222;
    41  low[2] = 0x33333333;
    42  low[3] = 0x44444444;
    43 
    44  high[0] = 0x55555555;
    45  high[1] = 0x66666666;
    46  high[2] = 0x77777777;
    47  high[3] = 0x88888888;
    48 
     45  high[0] = 0x55555555;
     46  high[1] = 0x66666666;
     47  high[2] = 0x77777777;
     48  high[3] = 0x88888888;
     49  rtems_stack_checker_report_usage();
    4950}
  • testsuites/libtests/stackchk/stackchk.scn

    r71a3078 rba6f945a  
    66TA1  - rtems_clock_get_tod - 09:00:10   12/31/1988
    77TA2  - rtems_clock_get_tod - 09:00:10   12/31/1988
     8Stack usage by thread
     9    ID      NAME    LOW          HIGH     CURRENT     AVAILABLE     USED
     100x09010001  IDLE 0002022AE0 - 0002023AEF 00020238B0      4096        592
     110x0A010002  TA1  0002025630 - 000202863F 0002028420     12288       2752
     120x0A010003  TA2  0002028BD8 - 000202BBE7 000202B9C0     12288       2856
     130x0A010004  TA3  000202C180 - 000202F18F 000202EF70     12288       2752
     140xFFFFFFFF  INTR 0002020200 - 00020211FF 0000000000      4080        792
    815TA1  - rtems_clock_get_tod - 09:00:15   12/31/1988
    916BLOWN STACK!!!
Note: See TracChangeset for help on using the changeset viewer.