about summary refs log tree commit diff
path: root/src/libstd/sys/windows/backtrace/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys/windows/backtrace/mod.rs')
-rw-r--r--src/libstd/sys/windows/backtrace/mod.rs21
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 {