|
|
|
|
|
by dgrunwald
508 days ago
|
|
Yes, that is typically the way to go. Collecting a call stack only requires unwinding information (which is usually already present for C++ exceptions / Rust panics), not full debug symbols. This gives you a list of instruction pointers. (on Linux, the glibc `backtrace` function can help with this) Print those instruction pointers in a relative form (e.g. "my_binary+0x1234") so that the output is independent of ASLR. The above is all that needs to happen on the production/customer machines, so you don't need to ship debug symbols -- you can ship `strip`ped binaries. On your own infrastructure, keep the original un-stripped binaries around. We use a script involving elfutil's eu-addr2line with those original binaries to turn the module+relative_address stack trace into a readable symbolized stack trace.
I wasn't aware of llvm-symbolizer yet, seems like that can do the same job as eu-addr2line.
(There's also binutil's addr2line but in my experience that didn't work as well as eu-addr2line) |
|