Skip to content

Commit 6698865

Browse files
committed
Update and tweak the README intro
1 parent 6ccfac1 commit 6698865

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
<br/>
66
[![Community Discord Link](https://img.shields.io/badge/Chat%20on%20the%20(very%20small)-Community%20Discord-blue?labelColor=2C3239&color=7289DA&style=flat&logo=discord&logoColor=959DA5)](https://discord.gg/frjaAZvqUZ)
77
<br/>
8-
[![Try on Compiler Explorer](https://img.shields.io/badge/-Compiler%20Explorer-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAACXBIWXMAAACwAAAAsAEUaqtpAAABSElEQVQokYVTsU7DMBB9QMTCEJbOMLB5oF0tRfUPIPIJZctYJkZYu3WMxNL+ARUfQKpImcPgDYnsXWBgYQl61TkYyxI3Wef37j3fnQ/6vkcsikY9AbiWq0mpbevDBmLRqDEAA4CEHMADgFRwrwDmch6X2i73RCFVHvC/WCeCMAFpC2AFoPPu5x4md4rnAN4luS61nYWSgauNU8ydkr0bLTMYAoIYtWqxM4LtEumeERDtfUjlMDrp7L67iddyyJtOvUIu2rquVn4iiVSOKXYhiMSJWLwUJZLuQ2CWmVldV4MT11UmXgB8fr0dX3WP6VHMiVrscim6Da2mJxffzwSU2v6xWzSKmzQ4cUTOaCBTvWgU14xkzjhckKm/q3wnrRAcAhksxMZNAdxEf0fRKI6E8zqT1C0X28ccRpqAUltW5pu4sxv5Mb8B4AciE3bHMxz/+gAAAABJRU5ErkJggg==&labelColor=2C3239&style=flat&label=Try+it+on&color=30C452)](https://godbolt.org/z/c6TqTzqcf)
8+
[![Try on Compiler Explorer](https://img.shields.io/badge/-Compiler%20Explorer-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAACXBIWXMAAACwAAAAsAEUaqtpAAABSElEQVQokYVTsU7DMBB9QMTCEJbOMLB5oF0tRfUPIPIJZctYJkZYu3WMxNL+ARUfQKpImcPgDYnsXWBgYQl61TkYyxI3Wef37j3fnQ/6vkcsikY9AbiWq0mpbevDBmLRqDEAA4CEHMADgFRwrwDmch6X2i73RCFVHvC/WCeCMAFpC2AFoPPu5x4md4rnAN4luS61nYWSgauNU8ydkr0bLTMYAoIYtWqxM4LtEumeERDtfUjlMDrp7L67iddyyJtOvUIu2rquVn4iiVSOKXYhiMSJWLwUJZLuQ2CWmVldV4MT11UmXgB8fr0dX3WP6VHMiVrscim6Da2mJxffzwSU2v6xWzSKmzQ4cUTOaCBTvWgU14xkzjhckKm/q3wnrRAcAhksxMZNAdxEf0fRKI6E8zqT1C0X28ccRpqAUltW5pu4sxv5Mb8B4AciE3bHMxz/+gAAAABJRU5ErkJggg==&labelColor=2C3239&style=flat&label=Try+it+on&color=30C452)](https://godbolt.org/z/aP8PsxxeY)
99

10-
Cpptrace is a simple and portable C++ stacktrace library supporting C++11 and greater on Linux, macOS,
11-
and Windows including MinGW and Cygwin environments. The goal: Make stack traces simple for once.
10+
Cpptrace is a simple and portable C++ stacktrace library supporting C++11 and greater on Linux, macOS, and Windows
11+
including MinGW and Cygwin environments. The goal: Make stack traces simple for once.
12+
13+
In addition to providing access to stack traces, cpptrace also provides a mechanism for getting stacktraces from thrown
14+
exceptions which is immensely valuable for debugging and triaging. More info [below](#traces-from-all-exceptions-cpptrace_try-and-cpptrace_catch).
1215

1316
Cpptrace also has a C API, docs [here](docs/c-api.md).
1417

@@ -87,22 +90,26 @@ Cpptrace can also retrieve function inlining information on optimized release bu
8790

8891
![Inlining](res/inlining.png)
8992

90-
Cpptrace provides access to resolved stack traces as well as lightweight raw traces (just addresses) that can be
91-
resolved later:
93+
Cpptrace provides access to resolved stack traces as well as fast and lightweight raw traces (just addresses) that can
94+
be resolved later:
9295

9396
```cpp
9497
const auto raw_trace = cpptrace::generate_raw_trace();
9598
// then later
9699
raw_trace.resolve().print();
97100
```
98101

99-
Cpptrace provides a way to produce stack traces on arbitrary exceptions. More information on this system
100-
[below](#traces-from-all-exceptions).
102+
One of the most important features cpptrace offers is the ability to retrieve stack traces on arbitrary exceptions.
103+
More information on this system [below]((#traces-from-all-exceptions-cpptrace_try-and-cpptrace_catch)).
101104
```cpp
102105
#include <cpptrace/from_current.hpp>
106+
#include <iostream>
107+
#include <stdexcept>
108+
103109
void foo() {
104110
throw std::runtime_error("foo failed");
105111
}
112+
106113
int main() {
107114
CPPTRACE_TRY {
108115
foo();
@@ -135,8 +142,9 @@ Additional notable features:
135142
- Utilities for demangling
136143
- Utilities for catching `std::exception`s and wrapping them in traced exceptions
137144
- Signal-safe stack tracing
145+
- As far as I can tell cpptrace is the only library which can truly do this in a signal-safe manner
138146
- Source code snippets in traces
139-
- Extensive configuration options for [trace formatting](#formatting)
147+
- Extensive configuration options for [trace formatting](#formatting) and pretty-printing
140148

141149
![Snippets](res/snippets.png)
142150

res/from_current.png

50.5 KB
Loading

0 commit comments

Comments
 (0)