1010Cpptrace is a lightweight C++ stacktrace library supporting C++11 and greater on Linux, macOS, and Windows including
1111MinGW and Cygwin environments. The goal: Make stack traces simple for once.
1212
13- Some day C++23's ` <stacktrace> ` will be ubiquitous. And maybe one day the msvc implementation will be acceptable.
14-
15- This library is in beta, if you run into any problems please open an [ issue] [ issue ] !
16-
17- [ issue ] : https://github.com/jeremy-rifkin/cpptrace/issues
18-
1913## Table of Contents <!-- omit in toc -->
2014
2115- [ 30-Second Overview] ( #30-second-overview )
@@ -24,6 +18,8 @@ This library is in beta, if you run into any problems please open an [issue][iss
2418 - [ API] ( #api )
2519 - [ Notable Library Configurations] ( #notable-library-configurations )
2620 - [ Notes About the Library and Future Work] ( #notes-about-the-library-and-future-work )
21+ - [ FAQ: What about C++23 ` <stacktrace> ` ?] ( #faq-what-about-c23-stacktrace )
22+ - [ Supported Debug Symbols] ( #supported-debug-symbols )
2723 - [ Usage] ( #usage )
2824 - [ CMake FetchContent] ( #cmake-fetchcontent )
2925 - [ System-Wide Installation] ( #system-wide-installation )
@@ -85,7 +81,7 @@ include(FetchContent)
8581FetchContent_Declare(
8682 cpptrace
8783 GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git
88- GIT_TAG v0.1.1 # <HASH or TAG>
84+ GIT_TAG v0.2.0-beta # <HASH or TAG>
8985)
9086FetchContent_MakeAvailable(cpptrace)
9187target_link_libraries(your_target cpptrace)
@@ -238,6 +234,28 @@ A couple things I'd like to fix in the future:
238234 the call instruction. Execinfo suffers from the same problem, but libgcc's `_Unwind` provides a means to detect this.
239235 I would like to find a solution on windows so stack traces are more accurate.
240236
237+ ### FAQ: What about C++23 `<stacktrace>`?
238+
239+ Some day C++23's `<stacktrace>` will be ubiquitous. And maybe one day the msvc implementation will be acceptable.
240+ The main motivation for this library was The original motivation for cpptrace was to support projects using older C++
241+ standards and as the library has grown its functionality has extended beyond the standard library's implementation.
242+
243+ Plenty of additional functionality is planned too, such as stack tracing from signal handlers, stack tracing other
244+ threads, and generating lightweight stack traces on embedded devices that can be resolved either on embedded or on
245+ another system (this is theoretically possible currently but untested).
246+
247+ ## Supported Debug Symbols
248+
249+ | Format | Supported |
250+ | ------------------------------------------------ | --------- |
251+ | DWARF in binary | ✔️ |
252+ | DWARF in separate binary (binary gnu debug link) | Not yet |
253+ | DWARF in separate binary (split dwarf) | Not yet |
254+ | DWARF in dSYM | ✔️ |
255+ | DWARF in via Mach-O debug map | Not yet |
256+ | Windows debug symbols in PE | Untested |
257+ | Windows debug symbols in PDB | ✔️ |
258+
241259## Usage
242260
243261### CMake FetchContent
@@ -249,7 +267,7 @@ include(FetchContent)
249267FetchContent_Declare(
250268 cpptrace
251269 GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git
252- GIT_TAG v0.1.1 # <HASH or TAG>
270+ GIT_TAG v0.2.0-beta # <HASH or TAG>
253271)
254272FetchContent_MakeAvailable(cpptrace)
255273target_link_libraries(your_target cpptrace)
@@ -265,7 +283,7 @@ information.
265283
266284``` sh
267285git clone https://github.com/jeremy-rifkin/cpptrace.git
268- git checkout v0.1.1
286+ git checkout v0.2.0-beta
269287mkdir cpptrace/build
270288cd cpptrace/build
271289cmake .. -DCMAKE_BUILD_TYPE=Release
@@ -301,7 +319,7 @@ you when installing new libraries.
301319
302320``` ps1
303321git clone https://github.com/jeremy-rifkin/cpptrace.git
304- git checkout v0.1.1
322+ git checkout v0.2.0-beta
305323mkdir cpptrace/build
306324cd cpptrace/build
307325cmake .. -DCMAKE_BUILD_TYPE=Release
@@ -319,7 +337,7 @@ To install just for the local user (or any custom prefix):
319337
320338``` sh
321339git clone https://github.com/jeremy-rifkin/cpptrace.git
322- git checkout v0.1.1
340+ git checkout v0.2.0-beta
323341mkdir cpptrace/build
324342cd cpptrace/build
325343cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME /wherever
0 commit comments