Skip to content

Commit f9553cd

Browse files
authored
Instructions for adding symbols to Linux backtraces (#98)
Document how symbolicate-linux-fatal tool from swiftlang/swift#4479 can be used to add symbols to backtraces on Linux
1 parent 7688da2 commit f9553cd

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Development.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ For example, `make test FILTER=ClientTests` will run `MongoSwiftTests.ClientTest
5151

5252
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`.
5353

54+
### Diagnosing Backtraces on Linux
55+
56+
[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:
57+
58+
```
59+
$ swift test --filter CrashingTest &> crash.log
60+
$ symbolicate-linux-fatal /path/to/MongoSwiftPackageTests.xctest crash.log
61+
```
62+
63+
This will require you to manually provide the path to the compiled test binary (e.g. `.build/x86_64-unknown-linux/debug/MongoSwiftPackageTests.xctest`).
64+
5465
## Writing and Generating Documentation
5566
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.
5667
Comments that are _not_ documentation should use two slashes (`//`).
@@ -88,4 +99,4 @@ Once you get the required approvals and your code passes all tests:
8899
* [libmongoc docs](http://mongoc.org/libmongoc/current/index.html)
89100
* [libbson docs](http://mongoc.org/libbson/current/index.html)
90101
* [MongoDB docs](https://docs.mongodb.com/)
91-
* [Driver specifications](https://github.com/mongodb/specifications)
102+
* [Driver specifications](https://github.com/mongodb/specifications)

0 commit comments

Comments
 (0)