ada-examples-4-10-branch
ada-examples-4-10-2
Last change
on this file was
51f4331,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/17/09 at 18:13:38
|
2009-09-17 Joel Sherrill <joel.sherrill@…>
- Makefile, check-off.txt, check-on.txt, stack_check.adb: Make follow
standard RTEMS test output format. Add output screens where
appropriate.
- stack_check.scn: New file.
|
-
Property mode set to
100644
|
File size:
624 bytes
|
Line | |
---|
1 | -- |
---|
2 | -- Blow the stack |
---|
3 | -- |
---|
4 | -- $Id$ |
---|
5 | -- |
---|
6 | |
---|
7 | with Text_IO; use Text_IO; |
---|
8 | |
---|
9 | procedure stack_check is |
---|
10 | |
---|
11 | type UselessArrayType is array (1 .. 512) of Natural; |
---|
12 | UselessArray : UselessArrayType; |
---|
13 | |
---|
14 | procedure BlowMe ( |
---|
15 | N : in Natural; |
---|
16 | U : in out UselessArrayType |
---|
17 | ) is |
---|
18 | MyUselessArray : UselessArrayType; |
---|
19 | begin |
---|
20 | Text_IO.Put_Line ( "Call depth = " & Natural'Image(N) ); |
---|
21 | U(5) := N; |
---|
22 | U(6) := N+1; |
---|
23 | BlowMe (N + 1, MyUselessArray); |
---|
24 | U(5) := MyUselessArray(10); |
---|
25 | end BlowMe; |
---|
26 | |
---|
27 | begin |
---|
28 | Put_Line ("*** GNAT/RTEMS Stack Checker Test ***"); |
---|
29 | BlowMe (1, UselessArray); |
---|
30 | end stack_check; |
---|
31 | |
---|
Note: See
TracBrowser
for help on using the repository browser.