diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/backtrace/src/symbolize/miri.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/backtrace/src/symbolize/miri.rs')
-rw-r--r-- | vendor/backtrace/src/symbolize/miri.rs | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/vendor/backtrace/src/symbolize/miri.rs b/vendor/backtrace/src/symbolize/miri.rs deleted file mode 100644 index 5b0dc30..0000000 --- a/vendor/backtrace/src/symbolize/miri.rs +++ /dev/null @@ -1,56 +0,0 @@ -use core::ffi::c_void; -use core::marker::PhantomData; - -use super::super::backtrace::miri::{resolve_addr, Frame}; -use super::BytesOrWideString; -use super::{ResolveWhat, SymbolName}; - -pub unsafe fn resolve(what: ResolveWhat<'_>, cb: &mut dyn FnMut(&super::Symbol)) { - let sym = match what { - ResolveWhat::Address(addr) => Symbol { - inner: resolve_addr(addr), - _unused: PhantomData, - }, - ResolveWhat::Frame(frame) => Symbol { - inner: frame.inner.clone(), - _unused: PhantomData, - }, - }; - cb(&super::Symbol { inner: sym }) -} - -pub struct Symbol<'a> { - inner: Frame, - _unused: PhantomData<&'a ()>, -} - -impl<'a> Symbol<'a> { - pub fn name(&self) -> Option<SymbolName<'_>> { - Some(SymbolName::new(&self.inner.inner.name)) - } - - pub fn addr(&self) -> Option<*mut c_void> { - Some(self.inner.addr) - } - - pub fn filename_raw(&self) -> Option<BytesOrWideString<'_>> { - Some(BytesOrWideString::Bytes(&self.inner.inner.filename)) - } - - pub fn lineno(&self) -> Option<u32> { - Some(self.inner.inner.lineno) - } - - pub fn colno(&self) -> Option<u32> { - Some(self.inner.inner.colno) - } - - #[cfg(feature = "std")] - pub fn filename(&self) -> Option<&std::path::Path> { - Some(std::path::Path::new( - core::str::from_utf8(&self.inner.inner.filename).unwrap(), - )) - } -} - -pub unsafe fn clear_symbol_cache() {} |