Why doesn't abseil Stacktrace print line numbers? #1688
-
Why doesn't abseil Stacktrace print line numbers? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The primary use of Abseil's stacktrace functionality is to give a stacktrace in a signal handler when a program crashes. This means that the implementation needs to be async-signal-safe, which limits what we can do easily. Maybe it is possible to get line numbers in an async-signal-safe way, but no one has done it yet. Another consequence of async-signal-safety is that Abseil's stacktrace, at least on Linux, is slower than some of the alternatives. That doesn't make it a good general stacktrace method. We have another implementation that gets us line numbers, but that isn't async-signal-safe. I would like to include it as part of Abseil, but we have are hands busy in other things today. C++23 offers |
Beta Was this translation helpful? Give feedback.
The primary use of Abseil's stacktrace functionality is to give a stacktrace in a signal handler when a program crashes. This means that the implementation needs to be async-signal-safe, which limits what we can do easily. Maybe it is possible to get line numbers in an async-signal-safe way, but no one has done it yet.
Another consequence of async-signal-safety is that Abseil's stacktrace, at least on Linux, is slower than some of the alternatives. That doesn't make it a good general stacktrace method.
We have another implementation that gets us line numbers, but that isn't async-signal-safe. I would like to include it as part of Abseil, but we have are hands busy in other things today.
C…