optional native stack traces
This commit is contained in:
parent
145fabeb67
commit
48e3b3e0f1
1 changed files with 2 additions and 2 deletions
|
|
@ -64,7 +64,7 @@ const
|
||||||
nativeStackTraceSupported = (defined(macosx) or defined(linux)) and
|
nativeStackTraceSupported = (defined(macosx) or defined(linux)) and
|
||||||
not nimrodStackTrace
|
not nimrodStackTrace
|
||||||
|
|
||||||
when nativeStacktrace and nativeStackTraceSupported:
|
when defined(nativeStacktrace) and nativeStackTraceSupported:
|
||||||
type
|
type
|
||||||
TDl_info {.importc: "Dl_info", header: "<dlfcn.h>",
|
TDl_info {.importc: "Dl_info", header: "<dlfcn.h>",
|
||||||
final, pure.} = object
|
final, pure.} = object
|
||||||
|
|
@ -165,7 +165,7 @@ proc rawWriteStackTrace(s: var string) =
|
||||||
add(s, "Traceback (most recent call last)")
|
add(s, "Traceback (most recent call last)")
|
||||||
add(s, stackTraceNewLine)
|
add(s, stackTraceNewLine)
|
||||||
auxWriteStackTrace(framePtr, s)
|
auxWriteStackTrace(framePtr, s)
|
||||||
elif nativeStackTrace and nativeStackTraceSupported:
|
elif defined(nativeStackTrace) and nativeStackTraceSupported:
|
||||||
add(s, "Traceback from system (most recent call last)")
|
add(s, "Traceback from system (most recent call last)")
|
||||||
add(s, stackTraceNewLine)
|
add(s, stackTraceNewLine)
|
||||||
auxWriteStackTraceWithBacktrace(s)
|
auxWriteStackTraceWithBacktrace(s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue