https://github.com/backtrace-labs/libbun
Unwinding API with support for multiple backends
https://github.com/backtrace-labs/libbun
Last synced: 3 months ago
JSON representation
Unwinding API with support for multiple backends
- Host: GitHub
- URL: https://github.com/backtrace-labs/libbun
- Owner: backtrace-labs
- Created: 2021-03-11T20:27:46.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-24T21:21:46.000Z (over 3 years ago)
- Last Synced: 2025-03-29T19:51:12.484Z (10 months ago)
- Language: C
- Size: 161 KB
- Stars: 5
- Watchers: 14
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backtrace's unwinding support library
# Prerequisites
To compile this library you need the following:
- CMake 3.5 or newer
- a C11-compatible compiler
- Google Test (for testing)
On Ubuntu, the following packages are required:
- `libgtest-dev` - for tests
- `googletest` - for tests
- `libunwind-dev` - for the libunwind backend
Additionally, the following backends are supported:
- libunwind
- libbacktrace
- libunwindstack
# Build and test
This section assumes we're in a build folder one level below project root.
## Checkout and the build directory
```sh
git clone 'https://github.com/backtrace-labs/libbun.git'
cd libbun
mkdir build
cd build
```
## Configure with CMake
```sh
cmake \
-DBUILD_TESTING=ON \
-DCMAKE_MODULE_PATH=$(pwd)/../cmake \
..
```
Additional parameters are listed below. All of them are optional.
- `-DCRASHPAD_DIR=/path/to/crashpad` - path to non-standard location for crashpad (e.g. source build)
- `-DBUILD_TESTING=[ON|OFF]` - build tests
- `-DBUILD_TOOLS=[ON|OFF]` - build tools
- `-DBUILD_EXAMPLES=[ON|OFF]` - build examples
- `-DLIBUNWIND_ENABLED=[ON|OFF]` - build libunwind backend (default: detect if available)
- `-DLIBUNWIND_DIR=/non/standard/libunwind/dir` - path to non-standard location for crashpad (e.g. source build)
- `-DLIBBACKTRACE_ENABLED=[ON|OFF]` - build libbacktrace backend (default: detect if available)
- `-DLIBBACKTRACE_DIR=/non/standard/libbacktrace/dir` - path to non-standard location for libbacktrace (e.g. source build)
- `-DLIBUNWINDSTACK_ENABLED=OFF` - build libunwindstack backend (Android only, default: detect if available)
## Build with CMake
```sh
cmake --build .
```
If your CMake installation is new enough:
```sh
cmake --build . -j
```
## Test
```sh
ctest
````
For verbose and colorful output:
```sh
GTEST_COLOR=1 ctest -V
```