rust/src/test
bors 8519e7833d Auto merge of #22839 - lifthrasiir:better-backtrace, r=alexcrichton
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.

Some example trace:

```
thread '<main>' panicked at 'explicit panic', /home/arachneng/Works/git/rust/src/test/run-pass/backtrace-debuginfo.rs:74
stack backtrace:
   1:         0xd964702f - sys::backtrace::write::h32d93fffb64131b2yxC
   2:         0xd9670202 - panicking::on_panic::h3a4fcb37b873aefeooM
   3:         0xd95b396a - rt::unwind::begin_unwind_inner::h576b3df5f626902dJ2L
   4:         0xd9eb88df - rt::unwind::begin_unwind::h16852273847167740350
   5:         0xd9eb8afb - aux::callback::h15056955655605709172
                        at /home/arachneng/Works/git/rust/<std macros>:3
                        at src/test/run-pass/backtrace-debuginfo-aux.rs:15
   6:         0xd9eb8caa - outer::h2cf96412459fceb6ema
                        at src/test/run-pass/backtrace-debuginfo.rs:73
                        at src/test/run-pass/backtrace-debuginfo.rs:88
   7:         0xd9ebab24 - main::h3f701287441442edasa
                        at src/test/run-pass/backtrace-debuginfo.rs:134
   8:         0xd96daba8 - rust_try_inner
   9:         0xd96dab95 - rust_try
  10:         0xd9671af4 - rt::lang_start::h7da0de9529b4c394liM
  11:         0xd8f3aec4 - __libc_start_main
  12:         0xd9eb8148 - <unknown>
  13:         0xffffffff - <unknown>
```
2015-02-28 08:30:19 +00:00
..
auxiliary Test fixes and rebase conflicts 2015-02-27 15:13:35 -08:00
bench Revert hacks and add test for LLVM aborts due to empty aggregates. 2015-02-26 16:44:07 +02:00
codegen librustc: Forbid private types in public APIs. 2014-09-22 20:05:45 -07:00
compile-fail Rollup merge of #22823 - kmcallister:fix-21370, r=huonw 2015-02-27 20:37:37 +05:30
compile-fail-fulldeps Update suffixes en masse in tests using perl -p -i -e 2015-02-18 09:10:10 -05:00
debuginfo rollup merge of #22286: nikomatsakis/variance-4b 2015-02-18 15:52:01 -08:00
parse-fail Rollup merge of #22720 - edwardw:enum-struct-ident-walk-into-a-bar, r=nick29581 2015-02-24 12:33:40 +05:30
pretty Fix test fallouts 2015-02-22 02:14:27 +01:00
run-fail rollup merge of #22286: nikomatsakis/variance-4b 2015-02-18 15:52:01 -08:00
run-make Separate most of rustc::lint::builtin into a separate crate. 2015-02-28 15:33:59 +11:00
run-pass Auto merge of #22839 - lifthrasiir:better-backtrace, r=alexcrichton 2015-02-28 08:30:19 +00:00
run-pass-fulldeps Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichton 2015-02-17 19:35:12 +00:00
run-pass-valgrind Fallout: tests. As tests frequently elide things, lots of changes 2015-02-18 10:25:28 -05:00