#[non_exhaustive]pub struct DebugInfo {
pub instructions: HashMap<usize, DebugInst>,
pub functions: HashMap<Hash, DebugSignature>,
pub functions_rev: HashMap<usize, Hash>,
pub hash_to_ident: HashMap<Hash, Box<str>>,
}
Expand description
Debug information about a unit.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.instructions: HashMap<usize, DebugInst>
Debug information on each instruction.
functions: HashMap<Hash, DebugSignature>
Function signatures.
functions_rev: HashMap<usize, Hash>
Reverse lookup of a function.
hash_to_ident: HashMap<Hash, Box<str>>
Hash to identifier.
Implementations§
Source§impl DebugInfo
impl DebugInfo
Sourcepub fn instruction_at(&self, ip: usize) -> Option<&DebugInst>
pub fn instruction_at(&self, ip: usize) -> Option<&DebugInst>
Get debug instruction at the given instruction pointer.
Sourcepub fn function_at(&self, ip: usize) -> Option<(Hash, &DebugSignature)>
pub fn function_at(&self, ip: usize) -> Option<(Hash, &DebugSignature)>
Get the function corresponding to the given instruction pointer.
Sourcepub fn ident_for_hash(&self, hash: Hash) -> Option<&str>
pub fn ident_for_hash(&self, hash: Hash) -> Option<&str>
Access an identifier for the given hash - if it exists.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DebugInfo
impl<'de> Deserialize<'de> for DebugInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DebugInfo
impl RefUnwindSafe for DebugInfo
impl Send for DebugInfo
impl Sync for DebugInfo
impl Unpin for DebugInfo
impl UnwindSafe for DebugInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more