Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Stack-traces/FreeBASIC/stack-traces.basic
Normal file
21
Task/Stack-traces/FreeBASIC/stack-traces.basic
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "windows.bi"
|
||||
|
||||
Private Function Fn2() As Long
|
||||
Dim frames(0 To 60) As Any Ptr
|
||||
Dim framesPtr As Any Ptr Ptr = @frames(0)
|
||||
Dim hash As DWORD
|
||||
Dim As Long caught = CaptureStackBackTrace(0, 61, framesPtr, @hash)
|
||||
Print Using "Caught & frames using stack capture"; caught
|
||||
For i As Long = 0 To caught - 1
|
||||
Print Using "&) &"; caught - i; Hex(frames(i))
|
||||
Next
|
||||
Return caught
|
||||
End Function
|
||||
|
||||
Private Sub Fn1(num As Ulong)
|
||||
Dim As Long numFn2 = Fn2()
|
||||
Print Using "Fn2 returned & with num = &"; numFn2; num
|
||||
End Sub
|
||||
|
||||
Fn1(87)
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue