|
1 | 1 | use core::ffi::c_void;
|
2 | 2 | use core::fmt;
|
3 | 3 |
|
4 |
| -use self::dbghelp::trace_thread; |
5 |
| - |
6 | 4 | /// Inspects the current call-stack, passing all active frames into the closure
|
7 | 5 | /// provided to calculate a stack trace.
|
8 | 6 | ///
|
@@ -79,11 +77,12 @@ pub unsafe fn trace_unsynchronized<F: FnMut(&Frame) -> bool>(mut cb: F) {
|
79 | 77 | /// # Panics
|
80 | 78 | ///
|
81 | 79 | /// See information on `trace` for caveats on `cb` panicking.
|
| 80 | +#[cfg(all(windows, not(target_vendor = "uwp")))] |
82 | 81 | pub unsafe fn trace_thread_unsynchronized<F: FnMut(&Frame) -> bool>(
|
83 | 82 | thread: *mut c_void,
|
84 | 83 | mut cb: F,
|
85 | 84 | ) {
|
86 |
| - trace_thread(&mut cb, thread) |
| 85 | + trace_thread_imp(&mut cb, thread) |
87 | 86 | }
|
88 | 87 |
|
89 | 88 | /// A trait representing one frame of a backtrace, yielded to the `trace`
|
@@ -171,12 +170,15 @@ cfg_if::cfg_if! {
|
171 | 170 | } else if #[cfg(all(windows, not(target_vendor = "uwp")))] {
|
172 | 171 | mod dbghelp;
|
173 | 172 | use self::dbghelp::trace as trace_imp;
|
| 173 | + use self::dbghelp::trace_thread as trace_thread_imp; |
174 | 174 | pub(crate) use self::dbghelp::Frame as FrameImp;
|
175 | 175 | #[cfg(target_env = "msvc")] // only used in dbghelp symbolize
|
176 | 176 | pub(crate) use self::dbghelp::StackFrame;
|
177 | 177 | } else {
|
178 | 178 | mod noop;
|
179 | 179 | use self::noop::trace as trace_imp;
|
| 180 | + use self::noop::trace_thread as trace_thread_imp; |
| 181 | + use self::noop::trace_thread_unsynchronized; |
180 | 182 | pub(crate) use self::noop::Frame as FrameImp;
|
181 | 183 | }
|
182 | 184 | }
|
0 commit comments