Ignore:
Timestamp:
Jun 22, 2010, 7:59:35 PM (10 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}
Note: See TracChangeset for help on using the changeset viewer.