summary refs log tree commit diff
path: root/src/test/run-pass/backtrace-debuginfo.rs
AgeCommit message (Collapse)AuthorLines
2017-09-02Enable backtrace tests for macOS and iOSJohn Colanduoni-3/+1
2017-07-23Fix some doc/comment typos.Bruce Mitchener-2/+2
2017-02-15Improve backtrace formating while panicking.Yamakaky-2/+2
- `RUST_BACKTRACE=full` prints all the informations (old behaviour) - `RUST_BACKTRACE=(0|no)` disables the backtrace. - `RUST_BACKTRACE=<everything else>` (including `1`) shows a simplified backtrace, without the function addresses and with cleaned filenames and symbols. Also removes some unneded frames at the beginning and the end. Fixes #37783. PR is #38165.
2017-01-29Fix backtraces on i686-pc-windows-gnu by disabling FPOSegev Finer-1/+0
This might have performance implications. But do note that MSVC disables FPO by default nowadays and it's use is limited in exception heavy languages like C++. Closes: #28218
2017-01-28Disable backtrace tests on i686-pc-windows-gnu since it's broken by FPOSegev Finer-0/+1
2017-01-24Make backtraces work on Windows GNU targets again.Segev Finer-2/+0
This is done by adding a function that can return a filename to pass to backtrace_create_state. The filename is obtained in a safe way by first getting the filename, locking the file so it can't be moved, and then getting the filename again and making sure it's the same. See: https://github.com/rust-lang/rust/pull/37359#issuecomment-260123399 Issue: #33985
2016-10-18Fix some pretty printing testsVadim Petrochenkov-1/+1
2016-08-10[emscripten] Ignore testsJan-Erik Rediger-0/+1
Most of these rely on spawning processes, which is not possible in Emscripten.
2016-05-12Don't use env::current_exe with libbacktraceSteven Fackler-5/+9
If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc #21889
2016-04-11tests: update for MIR debuginfo.Eduard Burtescu-6/+0
2016-03-17Add #[rustc_no_mir] to make tests pass with -Z orbit.Eduard Burtescu-0/+6
2016-01-30trans: Inform LLVM we want CodeView on MSVCAlex Crichton-17/+11
This mirrors the behavior of `clang-cl.exe` by adding a `CodeView` global variable when emitting debug information. This should in turn help stack traces that are generated when code is compiled with debuginfo enabled. Closes #28133
2016-01-29Get tests working on MSVC 32-bitAlex Crichton-9/+7
2015-09-05Add line numbers to MSVC backtraceDiggory Blake-5/+14
Add comments
2015-09-04Add line numbers to windows-gnu backtracesDiggory Blake-10/+13
Fix formatting Remove unused imports Refactor Fix msvc build Fix line lengths Formatting Enable backtrace tests Fix using directive on mac pwd info Work-around buildbot PWD bug, and fix libbacktrace configuration Use alternative to `env -u` which is not supported on bitrig Disable tests on 32-bit windows gnu
2015-08-11Make the backtrace-debuginfo test less error proneBjörn Steinbrink-1/+11
LLVM might perform tail merging on the calls that initiate the unwinding process which breaks debuginfo and therefore this test. Since tail merging is guaranteed to break debuginfo, it should be disabled for this test. This allows us to restore a testcase that I had to remove earlier because of the same problem, because back then I didn't realize that disabling tail merging was an option. cc #27619
2015-06-20Pass fat pointers in two immediate argumentsBjörn Steinbrink-4/+0
This has a number of advantages compared to creating a copy in memory and passing a pointer. The obvious one is that we don't have to put the data into memory but can keep it in registers. Since we're currently passing a pointer anyway (instead of using e.g. a known offset on the stack, which is what the `byval` attribute would achieve), we only use a single additional register for each fat pointer, but save at least two pointers worth of stack in exchange (sometimes more because more than one copy gets eliminated). On archs that pass arguments on the stack, we save a pointer worth of stack even without considering the omitted copies. Additionally, LLVM can optimize the code a lot better, to a large degree due to the fact that lots of copies are gone or can be optimized away. Additionally, we can now emit attributes like nonnull on the data and/or vtable pointers contained in the fat pointer, potentially allowing for even more optimizations. This results in LLVM passes being about 3-7% faster (depending on the crate), and the resulting code is also a few percent smaller, for example: text data filename 5671479 3941461 before/librustc-d8ace771.so 5447663 3905745 after/librustc-d8ace771.so 1944425 2394024 before/libstd-d8ace771.so 1896769 2387610 after/libstd-d8ace771.so I had to remove a call in the backtrace-debuginfo test, because LLVM can now merge the tails of some blocks when optimizations are turned on, which can't correctly preserve line info. Fixes #22924 Cc #22891 (at least for fat pointers the code is good now)
2015-03-20std: Remove old_io/old_path from the preludeAlex Crichton-7/+9
This commit removes the reexports of `old_io` traits as well as `old_path` types and traits from the prelude. This functionality is now all deprecated and needs to be removed to make way for other functionality like `Seek` in the `std::io` module (currently reexported as `NewSeek` in the io prelude). Closes #23377 Closes #23378
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-1/+0
2015-03-03Fix backtrace tests for LinuxManish Goregaokar-4/+4
2015-02-28std: Fixed backtrace warnings and tests for non-Linux platforms.Kang Seonghoon-4/+26
- Fixed a couple of dead code warnings in std::sys::backtrace. - Made `backtrace-debuginfo` test a no-op on non-Linux platforms. - `backtrace-debuginfo` is no longer tested on pretty-rpass.
2015-02-27Makes the picky tidy satisfied. Also refers to the correct issue.Kang Seonghoon-1/+1
2015-02-27Removed an excess feature flag from the backtrace test.Kang Seonghoon-2/+0
2015-02-27std: Include line numbers in backtraces.Kang Seonghoon-0/+140
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.