about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorKang Seonghoon <public+git@mearie.org>2015-02-27 01:12:22 +0900
committerKang Seonghoon <public+git@mearie.org>2015-02-27 01:12:22 +0900
commitbdd31b38aaf320acc9dad5fa012ba2834348c1f8 (patch)
tree66827b883c569f0d3077fc9ed21b6ae6204464d5 /src/libstd/sys/unix/stack_overflow.rs
parentdccdde4007c191aa8b8d9cfffb0c7d3509fa675e (diff)
downloadrust-bdd31b38aaf320acc9dad5fa012ba2834348c1f8.tar.gz
rust-bdd31b38aaf320acc9dad5fa012ba2834348c1f8.zip
std: Include line numbers in backtraces.
Fixes #20978 for supported platforms (i.e. non-Android POSIX).

This uses `backtrace_pcinfo` to inspect the DWARF debug info
and list the file and line pairs for given stack frame.
Such pair is not unique due to the presence of inlined functions
and the updated routine correctly handles this case.
The code is modelled after libbacktrace's `backtrace_full` routine.

There is one known issue with this approach. Macros, when invoked,
take over the current frame and shadows the file and line pair
which has invoked a macro. In particular, this makes many panicking
macros a bit harder to inspect. This really is a debuginfo problem,
and the backtrace routine should print them correctly with
a correct debuginfo.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions