File tree 2 files changed +25
-4
lines changed
tests/run-make/pdb-alt-path
2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 10
10
11
11
# Test that backtraces still can find debuginfo by checking that they contain symbol names and
12
12
# source locations.
13
- RUST_BACKTRACE="full" $(TMPDIR)/my_crate_name.exe &> $(TMPDIR)/backtrace.txt || exit 0
14
- $(CGREP) "my_crate_name::main " < $(TMPDIR)/backtrace.txt
15
- $(CGREP) "pdb-alt-path\\ main.rs:2 " < $(TMPDIR)/backtrace.txt
13
+ $(TMPDIR)/my_crate_name.exe &> $(TMPDIR)/backtrace.txt
14
+ $(CGREP) "my_crate_name::fn_in_backtrace " < $(TMPDIR)/backtrace.txt
15
+ $(CGREP) "main.rs:15 " < $(TMPDIR)/backtrace.txt
16
16
17
17
# Test that explicitly passed `-Clink-arg=/PDBALTPATH:...` is respected
18
18
$(RUSTC) main.rs -g --crate-name my_crate_name --crate-type bin -Clink-arg=/PDBALTPATH:abcdefg.pdb -Cforce-frame-pointers
Original file line number Diff line number Diff line change
1
+ // The various #[inline(never)] annotations and std::hint::black_box calls are
2
+ // an attempt to make unwinding as non-flaky as possible on i686-pc-windows-msvc.
3
+
4
+ #[ inline( never) ]
5
+ fn generate_backtrace ( x : & u32 ) {
6
+ std:: hint:: black_box ( x) ;
7
+ let bt = std:: backtrace:: Backtrace :: force_capture ( ) ;
8
+ println ! ( "{}" , bt) ;
9
+ std:: hint:: black_box ( x) ;
10
+ }
11
+
12
+ #[ inline( never) ]
13
+ fn fn_in_backtrace ( x : & u32 ) {
14
+ std:: hint:: black_box ( x) ;
15
+ generate_backtrace ( x) ;
16
+ std:: hint:: black_box ( x) ;
17
+ }
18
+
1
19
fn main ( ) {
2
- panic ! ( "backtrace please" ) ;
20
+ let x = & 41 ;
21
+ std:: hint:: black_box ( x) ;
22
+ fn_in_backtrace ( x) ;
23
+ std:: hint:: black_box ( x) ;
3
24
}
You can’t perform that action at this time.
0 commit comments