diff options
| author | Stein Somers <git@steinsomers.be> | 2019-01-09 15:15:18 +0100 |
|---|---|---|
| committer | Stein Somers <git@steinsomers.be> | 2019-01-09 15:15:18 +0100 |
| commit | ccba43df81d5bda37c9e4d231ad4443e6f3a7e44 (patch) | |
| tree | efe674e2d5ae721f38fa8558385e0a2f12997227 /src/libstd/sys/windows/backtrace/mod.rs | |
| parent | f9f71cc32497ee4e3cbc7d9795bcf358a9268c13 (diff) | |
| parent | 664c7797f6bfddf9f5e67474c2fd8017f91d7110 (diff) | |
| download | rust-ccba43df81d5bda37c9e4d231ad4443e6f3a7e44.tar.gz rust-ccba43df81d5bda37c9e4d231ad4443e6f3a7e44.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/libstd/sys/windows/backtrace/mod.rs')
| -rw-r--r-- | src/libstd/sys/windows/backtrace/mod.rs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/libstd/sys/windows/backtrace/mod.rs b/src/libstd/sys/windows/backtrace/mod.rs index cfa9e7b7c25..4bda8ac91da 100644 --- a/src/libstd/sys/windows/backtrace/mod.rs +++ b/src/libstd/sys/windows/backtrace/mod.rs @@ -1,13 +1,3 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - //! As always, windows has something very different than unix, we mainly want //! to avoid having to depend too much on libunwind for windows. //! @@ -113,7 +103,7 @@ fn set_frames<W: StackWalker>(StackWalk: W, frames: &mut [Frame]) -> io::Result< frames[i] = Frame { symbol_addr: addr, exact_position: addr, - inline_context: 0, + inline_context: frame.get_inline_context(), }; i += 1 @@ -219,6 +209,7 @@ trait StackFrame { fn new() -> Self; fn init(&mut self, ctx: &c::CONTEXT) -> c::DWORD; fn get_addr(&self) -> *const u8; + fn get_inline_context(&self) -> u32; } impl StackFrame for c::STACKFRAME_EX { @@ -273,6 +264,10 @@ impl StackFrame for c::STACKFRAME_EX { fn get_addr(&self) -> *const u8 { (self.AddrPC.Offset - 1) as *const u8 } + + fn get_inline_context(&self) -> u32 { + self.InlineFrameContext + } } impl StackFrame for c::STACKFRAME64 { @@ -327,6 +322,10 @@ impl StackFrame for c::STACKFRAME64 { fn get_addr(&self) -> *const u8 { (self.AddrPC.Offset - 1) as *const u8 } + + fn get_inline_context(&self) -> u32 { + 0 + } } enum StackWalkVariant { |
