finish the stacktraces.nim implementation [backport:1.2] (#15393)
This commit is contained in:
parent
4b9eea2fcc
commit
e2d80b15a6
2 changed files with 7 additions and 6 deletions
|
|
@ -120,3 +120,4 @@ proc initDefines*(symbols: StringTableRef) =
|
|||
defineSymbol("nimDoesntTrackDefects")
|
||||
defineSymbol("nimHasLentIterators")
|
||||
defineSymbol("nimHasDeclaredMagic")
|
||||
defineSymbol("nimHasStacktracesModule")
|
||||
|
|
|
|||
|
|
@ -22,26 +22,26 @@ when defined(nimStackTraceOverride):
|
|||
## This is the same as the type ``uintptr_t`` in C.
|
||||
|
||||
StackTraceOverrideGetTracebackProc* = proc (): string {.
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [].}
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [], noinline.}
|
||||
StackTraceOverrideGetProgramCountersProc* = proc (maxLength: cint): seq[cuintptr_t] {.
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [].}
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [], noinline.}
|
||||
StackTraceOverrideGetDebuggingInfoProc* =
|
||||
proc (programCounters: seq[cuintptr_t], maxLength: cint): seq[StackTraceEntry] {.
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [].}
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [], noinline.}
|
||||
|
||||
# Default procedures (not normally used, because people opting in on this
|
||||
# override are supposed to register their own versions).
|
||||
var
|
||||
stackTraceOverrideGetTraceback: StackTraceOverrideGetTracebackProc =
|
||||
proc (): string {.nimcall, gcsafe, locks: 0, raises: [], tags: [].} =
|
||||
proc (): string {.nimcall, gcsafe, locks: 0, raises: [], tags: [], noinline.} =
|
||||
discard
|
||||
#result = "Stack trace override procedure not registered.\n"
|
||||
stackTraceOverrideGetProgramCounters: StackTraceOverrideGetProgramCountersProc =
|
||||
proc (maxLength: cint): seq[cuintptr_t] {.nimcall, gcsafe, locks: 0, raises: [], tags: [].} =
|
||||
proc (maxLength: cint): seq[cuintptr_t] {.nimcall, gcsafe, locks: 0, raises: [], tags: [], noinline.} =
|
||||
discard
|
||||
stackTraceOverrideGetDebuggingInfo: StackTraceOverrideGetDebuggingInfoProc =
|
||||
proc (programCounters: seq[cuintptr_t], maxLength: cint): seq[StackTraceEntry] {.
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [].} =
|
||||
nimcall, gcsafe, locks: 0, raises: [], tags: [], noinline.} =
|
||||
discard
|
||||
|
||||
# Custom procedure registration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue