diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3845d39 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,50 @@ +# Changelog + +- [Changelog](#changelog) +- [v0.2.0](#v020) +- [v0.1.1](#v011) +- [v0.1](#v01) + +# v0.2.0 + +Key changes: +- Added libdwarf as a back-end so cpptrace doesn't have to rely on addr2line or libbacktrace +- Overhauled library's public-facing interface to make the library more useful + - Added `raw_trace` interface + - Added `object_trace` interface + - Added `stacktrace` interface + - Updated `generate_trace` to return a `stacktrace` rather than a vector of frames + - Added `generate_trace` counterparts for raw and object traces + - Added `generate_trace` overloads with max_depth + - Added interface for internal demangling utility + - Added cache mode configuration + - Added option to absorb internal trace exceptions (by default it absorbs) + - Added `cpptrace::exception`, which automatically generates and stores a stacktrace when thrown + - Added `exception_with_message` + - Added traced analogs for stdexcept errors: `logic_error`, `domain_error`, `invalid_argument`, `length_error`, + `out_of_range`, `runtime_error`, `range_error`, `overflow_error`, and `underflow_error`. + +Other changes: +- Bundled libdwarf with cpptrace so the library can essentially be self-contained and not have to rely on libraries that + might not already be on a system +- Added StackWalk64 as an unwinding back-end on windows +- Added system for multiple symbol back-ends to be used, mainly for more complete stack traces on mingw +- Fixed sporadic line number reporting errors due to not adjusting the program counter from the unwinder +- Improved addr2line/atos invocation back-end on macos +- Lots of error handling improvements +- Performance improvements +- Updated default back-ends for most systems +- Removed full tracing backends +- Cleaned up library cmake +- Lots of internal cleanup and refactoring +- Improved library usage instructions in README + +# v0.1.1 + +Fixed: +- Handle errors when object files don't exist or can't be opened for reading +- Handle paths with spaces when using addr2line on windows + +# v0.1 + +Initial release of the library 🎉 diff --git a/README.md b/README.md index 6b4ab9c..2642c9f 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ include(FetchContent) FetchContent_Declare( cpptrace GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git - GIT_TAG v0.2.0-beta2 # + GIT_TAG v0.2.0 # ) FetchContent_MakeAvailable(cpptrace) target_link_libraries(your_target cpptrace) @@ -312,16 +312,16 @@ A note about performance: For handling of DWARF symbols there is a lot of room t and time-memory tradeoffs. If you find the current implementation is either slow or using too much memory, I'd be happy to explore some of these options. -A couple things I'd like to fix in the future: +A couple things I'd like to improve in the future: - On MacOS .dSYM files are required - On Windows when collecting symbols with dbghelp (msvc/clang) parameter types are almost perfect but due to limitations in dbghelp the library cannot accurately show const and volatile qualifiers or rvalue references (these appear as pointers). -- On Windows unwinding with `CaptureStackBackTrace` (msvc/clang) can sometimes produce program counters that are after - the call instruction. Execinfo suffers from the same problem, but libgcc's `_Unwind` provides a means to detect this. - I would like to find a solution on windows so stack traces are more accurate. -- Support for universal binaries on macos (fat mach-o files) is hacky and inefficient at the moment. Libdwarf should be - adding proper support for these soon thanks to an awesome maintainer. + +A couple features I'd like to add in the future: +- Tracing from signal handlers +- Tracing other thread's stacks +- Showing inlined calls in the stack trace ### FAQ: What about C++23 ``? @@ -357,7 +357,7 @@ include(FetchContent) FetchContent_Declare( cpptrace GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git - GIT_TAG v0.2.0-beta2 # + GIT_TAG v0.2.0 # ) FetchContent_MakeAvailable(cpptrace) target_link_libraries(your_target cpptrace) @@ -373,7 +373,7 @@ information. ```sh git clone https://github.com/jeremy-rifkin/cpptrace.git -git checkout v0.2.0-beta2 +git checkout v0.2.0 mkdir cpptrace/build cd cpptrace/build cmake .. -DCMAKE_BUILD_TYPE=Release @@ -409,7 +409,7 @@ you when installing new libraries. ```ps1 git clone https://github.com/jeremy-rifkin/cpptrace.git -git checkout v0.2.0-beta2 +git checkout v0.2.0 mkdir cpptrace/build cd cpptrace/build cmake .. -DCMAKE_BUILD_TYPE=Release @@ -427,7 +427,7 @@ To install just for the local user (or any custom prefix): ```sh git clone https://github.com/jeremy-rifkin/cpptrace.git -git checkout v0.2.0-beta2 +git checkout v0.2.0 mkdir cpptrace/build cd cpptrace/build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/wherever