summaryrefslogtreecommitdiffstats
path: root/library/backtrace/src/backtrace/noop.rs
blob: 7bcea67aa5f95411f8db3ddca3a45c4b52d648ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! Empty implementation of unwinding used when no other implementation is
//! appropriate.

use core::ffi::c_void;

#[inline(always)]
pub fn trace(_cb: &mut dyn FnMut(&super::Frame) -> bool) {}

#[derive(Clone)]
pub struct Frame;

impl Frame {
    pub fn ip(&self) -> *mut c_void {
        0 as *mut _
    }

    pub fn sp(&self) -> *mut c_void {
        0 as *mut _
    }

    pub fn symbol_address(&self) -> *mut c_void {
        0 as *mut _
    }

    pub fn module_base_address(&self) -> Option<*mut c_void> {
        None
    }
}