repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
etc/services - sync with NetBSD-8
[minix.git]
/
external
/
bsd
/
llvm
/
dist
/
clang
/
utils
/
TestUtils
/
deep-stack.py
blob
1750a5fca031da62783666b81da076e3f7846dee
1
#!/usr/bin/env python
2
3
def
pcall
(
f
,
N
):
4
if
N
==
0
:
5
print
>>
f
,
' f(0)'
6
return
7
8
print
>>
f
,
' f('
9
pcall
(
f
,
N
-
1
)
10
print
>>
f
,
' )'
11
12
def
main
():
13
f
=
open
(
't.c'
,
'w'
)
14
print
>>
f
,
'int f(int n) { return n; }'
15
print
>>
f
,
'int t() {'
16
print
>>
f
,
' return'
17
pcall
(
f
,
10000
)
18
print
>>
f
,
' ;'
19
print
>>
f
,
'}'
20
21
if
__name__
==
"__main__"
:
22
import
sys
23
sys
.
setrecursionlimit
(
100000
)
24
main
()