Description
At least since the change to use "atos" for resolving stack frames, the state of printing call stacks is pretty disastrous on macOS, regardless of the -g
switch:
-
Printing an exception stack trace will freeze the calling thread for an extended period of time (can be a few hundred ms), which means that a process that logs/prints a larger number of exceptions can easily become unusable or would be a very easy DDoS target.
-
For x86-64 builds in particular, the stack unwinding functionality appears to be broken and only the topmost stack frame is being displayed.
-
Resolving file names and line numbers doesn't seem to work at all.
-
Stack traces generated for system crash reports usually stop at the first
extern (D)
function (I'm not sure whether this might be a simple issue of--frame-pointer
, I'll have to check whether that makes a difference) -
On some systems
atos
isn't available at all
In comparison, dmd appears to work fine (stack traces with symbols working regardless and file/line number working correctly when passing -g
.
This has been an issue that wanted to dig deeper into for a while now, but never really got to it, so I just wanted to at least get this written down to maybe start a discussion.