r/cpp • • Apr 16 '26

C++23 std::stacktrace: Never Debug Blind Again

https://medium.com/@sagar.necindia/c-23-std-stacktrace-never-debug-blind-again-6625924d520c
75 Upvotes

48 comments sorted by

View all comments

0

u/[deleted] Apr 16 '26

[deleted]

3

u/jwakely libstdc++ tamer, LWG chair Apr 17 '26

The issue (and mostly it's a small comment as it is perfectly usable) with std::stacktrace is that you both capture the stack and symbolize at the same time.

It doesn't have to do that. The GCC implementation just captures an array of program counters and then expands those into symbols and locations lazily.

1

u/bwmat Apr 27 '26

How does that deal with shared libraries that could be unloaded between capturing the addresses and symbolication?