Some readme fixes

This commit is contained in:
Jeremy 2023-11-06 22:37:28 -05:00
parent 516b0f44ad
commit 0536669dc0
No known key found for this signature in database
GPG Key ID: BE03111EB7ED6E2E

View File

@ -562,10 +562,10 @@ To static link the library set `-DCPPTRACE_STATIC=On`.
Cpptrace supports a number of back-ends and middle-ends to produce stack traces. Stack traces are produced in roughly
three steps: Unwinding, symbol resolution, and demangling. Cpptrace by default on linux / macos will generate traces
with `_Unwind_Backtrace`, libdwarf, and `__cxa_demangle`. On windows traces are generated by default with
`StackWalk64` and dbghelp.h (no demangling is needed with dbghelp). Under mingw libdwarf and dbghelp.h are
used, along with `__cxa_demangle`. Support for these is the main focus of cpptrace and they should work well. If you
want to use a different back-end such as addr2line, however, you can configure the library to do so.
with `_Unwind_Backtrace`, libdwarf, and `__cxa_demangle`. On windows traces are generated by default with `StackWalk64`
and dbghelp.h (no demangling is needed with dbghelp). Under mingw libdwarf and dbghelp.h are used, along with
`__cxa_demangle`. Support for these is the main focus of cpptrace and they should work well. If you want to use a
different back-end such as addr2line, however, you can configure the library to do so.
**Unwinding**
@ -574,7 +574,7 @@ want to use a different back-end such as addr2line, however, you can configure t
| libgcc unwind | `CPPTRACE_UNWIND_WITH_UNWIND` | linux, macos, mingw | Frames are captured with libgcc's `_Unwind_Backtrace`, which currently produces the most accurate stack traces on gcc/clang/mingw. Libgcc is often linked by default, and llvm has something equivalent. |
| execinfo.h | `CPPTRACE_UNWIND_WITH_EXECINFO` | linux, macos | Frames are captured with `execinfo.h`'s `backtrace`, part of libc on linux/unix systems. |
| winapi | `CPPTRACE_UNWIND_WITH_WINAPI` | windows, mingw | Frames are captured with `CaptureStackBackTrace`. |
| dbghelp | `CPPTRACE_UNWIND_WITH_DBGHELP` | windows, mingw | Frames are captured with `StackWalk64`. |
| dbghelp | `CPPTRACE_UNWIND_WITH_DBGHELP` | windows, mingw | Frames are captured with `StackWalk64`. |
| N/A | `CPPTRACE_UNWIND_WITH_NOTHING` | all | Unwinding is not done, stack traces will be empty. |
Some back-ends (execinfo and `CaptureStackBackTrace`) require a fixed buffer has to be created to read addresses into