Skip to content

Instructions for adding symbols to Linux backtraces #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ For example, `make test FILTER=ClientTests` will run `MongoSwiftTests.ClientTest

To run all of the benchmarks, use `make benchmark` (equivalent to `FILTER=MongoSwiftBenchmarks`). To run a particular benchmark, use the `FILTER` environment variable to specify the name. To have the benchmark results all printed out at the end, run with `make benchmark | python Tests/MongoSwiftBenchmarks/benchmark.py`.

### Diagnosing Backtraces on Linux

[SWIFT-755](https://bugs.swift.org/browse/SR-755) documents an outstanding problem on Linux where backtraces do not contain debug symbols. As discussed in [this Stack Overflow thread](https://stackoverflow.com/a/44956167/162228), a [`symbolicate-linux-fatal`](https://github.com/apple/swift/blob/master/utils/symbolicate-linux-fatal) script may be used to add symbols to an existing backtrace. Consider the following:

```
$ swift test --filter CrashingTest &> crash.log
$ symbolicate-linux-fatal /path/to/MongoSwiftPackageTests.xctest crash.log
```

This will require you to manually provide the path to the compiled test binary (e.g. `.build/x86_64-unknown-linux/debug/MongoSwiftPackageTests.xctest`).

## Writing and Generating Documentation
We document new code as we write it. We use C-style documentation blocks (`/** ... */`) for documentation longer than 3 lines, and triple-slash (`///`) for shorter documentation.
Comments that are _not_ documentation should use two slashes (`//`).
Expand Down Expand Up @@ -88,4 +99,4 @@ Once you get the required approvals and your code passes all tests:
* [libmongoc docs](http://mongoc.org/libmongoc/current/index.html)
* [libbson docs](http://mongoc.org/libbson/current/index.html)
* [MongoDB docs](https://docs.mongodb.com/)
* [Driver specifications](https://github.com/mongodb/specifications)
* [Driver specifications](https://github.com/mongodb/specifications)