summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/stackchk/blow.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-22 19:59:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-22 19:59:35 +0000
commitba6f945a7e852a75c5b91474b4c9e0515962ebe0 (patch)
tree325a992406ec9d9845826649d7e699f95dd99d68 /testsuites/libtests/stackchk/blow.c
parent2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff)
downloadrtems-ba6f945a7e852a75c5b91474b4c9e0515962ebe0.tar.bz2
2010-06-22 Joel Sherrill <joel.sherrilL@OARcorp.com>
* stackchk/blow.c, stackchk/stackchk.scn: Print a stack check report before blowing stack.
Diffstat (limited to '')
-rw-r--r--testsuites/libtests/stackchk/blow.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/testsuites/libtests/stackchk/blow.c b/testsuites/libtests/stackchk/blow.c
index de5d4ee1fc..feefa5678c 100644
--- a/testsuites/libtests/stackchk/blow.c
+++ b/testsuites/libtests/stackchk/blow.c
@@ -14,6 +14,7 @@
*/
#include <rtems.h>
+#include <rtems/stackchk.h>
void b(void) {}
@@ -28,22 +29,22 @@ b();
* does not cause problems :)
*/
- area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area;
+ area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area;
- /* Look in the stack checker implementation for this magic offset */
- low = (volatile uint32_t *) (area + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE);
- high = (volatile uint32_t *)
- (area + _Thread_Executing->Start.Initial_stack.size - 16);
+ /* Look in the stack checker implementation for this magic offset */
+ low = (volatile uint32_t *) \
+ (area + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE);
+ high = (volatile uint32_t *)
+ (area + _Thread_Executing->Start.Initial_stack.size - 16);
+ low[0] = 0x11111111;
+ low[1] = 0x22222222;
+ low[2] = 0x33333333;
+ low[3] = 0x44444444;
- low[0] = 0x11111111;
- low[1] = 0x22222222;
- low[2] = 0x33333333;
- low[3] = 0x44444444;
-
- high[0] = 0x55555555;
- high[1] = 0x66666666;
- high[2] = 0x77777777;
- high[3] = 0x88888888;
-
+ high[0] = 0x55555555;
+ high[1] = 0x66666666;
+ high[2] = 0x77777777;
+ high[3] = 0x88888888;
+ rtems_stack_checker_report_usage();
}