rust/src/libstd/rt
Alex Crichton 829df69f9f Add basic backtrace functionality
Whenever a failure happens, if a program is run with
`RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr
handle. Stack traces are uncondtionally printed on double-failure and
rtabort!().

This ended up having a nontrivial implementation, and here's some highlights of
it:

* We're bundling libbacktrace for everything but OSX and Windows
* We use libgcc_s and its libunwind apis to get a backtrace of instruction
  pointers
* On OSX we use dladdr() to go from an instruction pointer to a symbol
* On unix that isn't OSX, we use libbacktrace to get symbols
* Windows, as usual, has an entirely separate implementation

Lots more fun details and comments can be found in the source itself.

Closes #10128
2014-03-13 00:24:20 -07:00
..
args.rs std: Rename unstable::mutex::Mutex to StaticNativeMutex. 2014-02-16 10:13:56 +11:00
at_exit_imp.rs Move replace and swap to std::mem. Get rid of std::util 2014-02-11 05:21:35 +08:00
backtrace.rs Add basic backtrace functionality 2014-03-13 00:24:20 -07:00
bookkeeping.rs std: Move libnative task count bookkeeping to std 2014-03-05 21:48:08 -08:00
crate_map.rs std: Remove lots of allocations from log settings 2014-02-28 12:24:50 -08:00
env.rs Register new snapshots 2014-02-14 22:55:20 -08:00
global_heap.rs std: Move raw to std::raw 2014-02-23 01:07:53 -08:00
libunwind.rs Add basic backtrace functionality 2014-03-13 00:24:20 -07:00
local.rs Publicise types/add #[allow(visible_private_types)] to a variety of places. 2014-03-01 00:12:34 +11:00
local_heap.rs std: Remove unstable::lang 2014-02-23 01:47:05 -08:00
local_ptr.rs Publicise types/add #[allow(visible_private_types)] to a variety of places. 2014-03-01 00:12:34 +11:00
logging.rs std: Remove lots of allocations from log settings 2014-02-28 12:24:50 -08:00
macros.rs Another round of test fixes from previous commits 2013-11-10 01:37:12 -08:00
mod.rs Add basic backtrace functionality 2014-03-13 00:24:20 -07:00
rtio.rs Roll std::run into std::io::process 2014-02-23 21:51:17 -08:00
stack.rs std: Tweak stack overflow printing for robustness 2014-02-25 16:51:52 -08:00
task.rs Spellcheck library docs. 2014-02-18 08:05:35 +11:00
thread.rs rustc: Support various flavors of linkages 2014-03-11 08:25:42 -07:00
thread_local_storage.rs Replace C types with Rust types in libstd, closes #7313 2014-01-22 19:20:47 +01:00
unwind.rs Add basic backtrace functionality 2014-03-13 00:24:20 -07:00
util.rs Add basic backtrace functionality 2014-03-13 00:24:20 -07:00