feat: add cpptrace for better stack traces output#347
Draft
feat: add cpptrace for better stack traces output#347
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds cpptrace as a new third party library to have more powerful stack traces outputs from thrown exceptions in GEOS.
The main benefit of this library is the output of the complete unwinding, even in STL, of errors (addressed partially with
<stacktrace>from C++23)Both methods, with uberenv/Spack and the older
scripts/config-build.py, are supported.On top of that, an option has been added to select the desired backend used by cpptrace to gather symbols (between libdwarf, libbacktrace and addr2line).
Via uberenv/Spack:
Via
scripts/config-build.py:as a command-line argument:
python scripts/config-build.py \ -hc ../GEOS/host-configs/your-platform.cmake \ -bt Release \ -DENABLE_CPPTRACE=ON \ -DCPPTRACE_SYMBOLS_BACKEND=libbacktrace # or without this line to use the default backendor directly in the host-config:
More info on symbols backends: https://github.com/jeremy-rifkin/cpptrace#library-back-ends