Commit a1a68e8d authored by Diederik van Arkel's avatar Diederik van Arkel

add stack traces

parent bdeec1a5
......@@ -36,4 +36,6 @@ listToString :: [x] -> String | toString x
//instance toString (WItemHandle .ls .ps)
instance toString WElementHandle`
instance toString WItemHandle`
instance toString UpdateInfo
\ No newline at end of file
instance toString UpdateInfo
printStackNow :: !Int -> Int
......@@ -196,4 +196,20 @@ instance toString UpdateInfo where
"," +++ toString info.updWindowArea+++
// "," +++ toString info.updControls+++
"," +++ toString info.updGContext+++
"}"
\ No newline at end of file
"}"
import code from "printStackNow.obj"
printStackNow :: !Int -> Int // in 2.0.2 only works with stack trace only...
printStackNow stackDepth = code {
ccall printStackNow "I:I"
}
/*
Start = testPS 8
testPS n
| n == 0 = printStackNow 10
| testPS (dec n) == 0 = 0
= 1
*/
.model small
.code
public _printStackNow
_printStackNow:
movl 4(%esp),%eax
pushl _stack_trace_depth
movl %eax,_stack_trace_depth
pushl %esi
pushl %edi
pushl %ebp
call write_profile_stack
popl %ebp
popl %edi
popl %esi
popl %eax
movl %eax,_stack_trace_depth
ret
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment