Skip to content

Commit b745c76

Browse files
committed
Updated changelog for the next release
1 parent 4f42488 commit b745c76

File tree

2 files changed

+110
-12
lines changed

2 files changed

+110
-12
lines changed

CHANGELOG.md

Lines changed: 108 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
- [Changelog](#changelog)
4+
- [v1.0.0](#v100)
45
- [v0.8.3](#v083)
56
- [v0.8.2](#v082)
67
- [v0.8.1](#v081)
@@ -29,34 +30,131 @@
2930
- [v0.1.1](#v011)
3031
- [v0.1](#v01)
3132

32-
# vX
33+
# v1.0.0
34+
35+
Major changes:
36+
- Overhauled how the from current exception system and `CPPTRACE_TRY`/`CPPTRACE_CATCH` macros work. They now check the
37+
thrown exception type against the type the catch accepts to decide whether or not to collect a trace. This eliminates
38+
the need for The `TRYZ`/`CATCHZ` variants of the macros as now the normal macro is equally zero-overhead. As such, the
39+
`Z` variants have been removed.
40+
41+
Breaking changes:
42+
- `CPPTRACE_TRYZ` and `CPPTRACE_CATCHZ` have been removed, change uses to `CPPTRACE_TRY`/`CPPTRACE_CATCH`
43+
- `CPPTRACE_TRY`/`CPPTRACE_CATCH` macros no longer support multiple handlers and `CPPTRACE_CATCH_ALT` has been removed.
44+
Instead, use `cpptrace::try_catch`.
45+
> **Details**
46+
>
47+
> Author's note: I apologize for this non-trivial breaking change, however, it allows for a much improved
48+
> implementation of the from current exception system and the impact should be [minimal for most codebases](https://github.com/search?type=code&q=%2F%5CbCPPTRACE_CATCH_ALT%5Cb%2F+language%3Ac%2B%2B+-is%3Afork+-repo%3Ajeremy-rifkin%2Fcpptrace+-path%3Afrom_current.hpp).
49+
>
50+
> Transitioning to `cpptrace::try_catch` is straightforward:
51+
> <table>
52+
> <thead>
53+
> <tr>
54+
> <td>
55+
> Before
56+
> </td>
57+
> <td>
58+
> Now
59+
> </td>
60+
> </tr>
61+
> </thead>
62+
> <tbody>
63+
> <tr>
64+
> <td>
65+
66+
> ```cpp
67+
> CPPTRACE_TRY {
68+
> foo();
69+
> } CPPTRACE_CATCH(const std::logic_error& e) {
70+
> handle_logic_error(e);
71+
> } CPPTRACE_CATCH_ALT(const std::exception& e) {
72+
> handle_exception(e);
73+
> } CPPTRACE_CATCH_ALT(...) {
74+
> handle_unknown_exception(e);
75+
> }
76+
> ```
77+
78+
> </td>
79+
> <td>
80+
81+
> ```cpp
82+
> cpptrace::try_catch(
83+
> [&] { // try block
84+
> foo();
85+
> },
86+
> [&] (const std::runtime_error& e) {
87+
> handle_logic_error(e);
88+
> },
89+
> [&] (const std::exception& e) {
90+
> handle_exception(e);
91+
> },
92+
> [&] () { // `catch(...)`
93+
> handle_unknown_exception(e);
94+
> }
95+
> );
96+
> ```
97+
98+
> </td>
99+
> </tr>
100+
> </tbody>
101+
> </table>
102+
>
103+
> Please note as well that code such as the following, which was valid before, will still compile now. The catch
104+
> handler will work but it won't receive a correct current trace.
105+
>
106+
> ```cpp
107+
> CPPTRACE_TRY {
108+
> foo();
109+
> } CPPTRACE_CATCH(const std::logic_error& e) {
110+
> ...
111+
> } catch(const std::exception& e) {
112+
> handle_exception(e);
113+
> }
114+
> ```
115+
116+
Potentially-breaking changes:
117+
- This version of cpptrace reworks the public interface to use an inline ABI versioning namespace. All symbols in the
118+
public interface are now secretly in the `cpptrace::v1` namespace. This is an ABI break, but any abi mismatch will
119+
result in linker errors instead of silent bugs. This change is an effort to allow future evolution of cpptrace in a
120+
way that respects ABI.
121+
- This version fixes a problem with returns from `CPPTRACE_TRY` blocks on windows. Unfortunately, this macro has to use
122+
an IILE on windows and as such `return` statements won't properly return from the enclosing function. This was a
123+
footgun and now `return` statements in `CPPTRACE_TRY` blocks are prevented from compiling on windows.
33124
34125
Added
126+
- Added `cpptrace::try_catch` for handling multiple alternatives with stack traces access
35127
- Added `cpptrace::rethrow` utility for rethrowing exceptions from `CPPTRACE_CATCH` while preserving the stacktrace https://github.com/jeremy-rifkin/cpptrace/issues/214
36128
- Added utilities for getting the current trace from the last rethrow point
37129
(`cpptrace::raw_trace_from_current_exception_rethrow`, `cpptrace::from_current_exception_rethrow`,
38130
`cpptrace::current_exception_was_rethrown`)
131+
- Added a logger system to allow cpptrace to report errors in a configurable manner. By default, cpptrace doesn't log
132+
anything. The following functions can be used to change this: (`cpptrace::set_log_level`,
133+
`cpptrace::set_log_callback`, and `cpptrace::use_default_stderr_logger`)
134+
- Added `cpptrace::basename` utility
39135
- Added formatter option to clean up some long symbol names (`cpptrace::formatter::prettify_symbols`)
40-
- Added some utilities to allow and control how cpptrace logs (`cpptrace::set_log_level`, `cpptrace::set_log_callback`,
41-
and `cpptrace::use_default_stderr_logger`)
42-
- Added `cpptrace::basename` and `cpptrace::prettify_type` utilities
136+
- Added `cpptrace::prettify_type` utility
137+
- Added `cpptrace::prune_symbol` utility
43138
- Added `cpptrace::detail::lazy_trace_holder::is_resolved`
44-
45-
Potentially-breaking changes:
46-
- This version of cpptrace reworks the public interface to use an inline ABI versioning namespace. All symbols in the
47-
public interface are now secretly in the `cpptrace::v1` namespace. This is an ABI break, but any abi mismatch will
48-
result in linker errors instead of silent bugs. This change is an effort to allow future evolution of cpptrace in a
49-
way that respects ABI.
139+
- Added support for C++20 modules https://github.com/jeremy-rifkin/cpptrace/pull/248
140+
- Added `cpptrace::load_symbols_for_file` to support DLLs loaded at runtime when using dbghelp https://github.com/jeremy-rifkin/cpptrace/pull/247
50141
51142
Fixed
143+
- Fixed a problem where `CPPTRACE_TRY` blocks could contain `return` statements but not return on windows due to an IILE. This is now an error. https://github.com/jeremy-rifkin/cpptrace/issues/245
52144
- Fixed cases where cpptrace could print to stderr on internal errors without the user desiring so https://github.com/jeremy-rifkin/cpptrace/issues/234
53145
- Fixed a couple internal locking mistakes
54146
- Prevented a couple code paths that could be susceptible to static init order issues
147+
- Fixed bug with loading elf symbol tables that contain zero-sized entries
148+
- Fixed an incorrect assertion regarding looking up symbols at program counters that reside before any seen subprogram DIE https://github.com/jeremy-rifkin/cpptrace/issues/250
55149
56150
Other
57151
- Marked some paths in `CPPTRACE_CATCH` and `CPPTRACE_CATCHZ` as unreachable to improve usability in cases where the
58152
compiler may warn about missing returns.
153+
- Improved resilience to libdwarf errors https://github.com/jeremy-rifkin/cpptrace/pull/251
59154
- Removed internal use of `std::is_trivial` which is deprecated in C++26 https://github.com/jeremy-rifkin/cpptrace/issues/236
155+
- Bumped libdwarf to 2.0.0
156+
- Added `--address` flag for internal symbol table tool
157+
- Various internal work to improve the codebase and reduce complexity
60158
61159
# v0.8.3
62160

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,8 +1232,8 @@ namespace cpptrace {
12321232
12331233
# ABI Versioning
12341234
1235-
Since cpptrace vX, the library uses an inline ABI versioning namespace and all symbols part of the public interface are
1236-
secretly under the namespace `cpptrace::v1`. This is done to allow for potential future library evolution in an
1235+
Since cpptrace v1.0.0, the library uses an inline ABI versioning namespace and all symbols part of the public interface
1236+
are secretly under the namespace `cpptrace::v1`. This is done to allow for potential future library evolution in an
12371237
ABI-friendly manner.
12381238
12391239
# Supported Debug Formats

0 commit comments

Comments
 (0)