Trait DebugInfoProvider

Source
pub unsafe trait DebugInfoProvider: Clone {
    type Reader: Reader<Offset = usize>;

    // Required method
    fn info_for(
        &self,
        fn_addr: u64,
    ) -> Result<DebugInfo<'_, Self::Reader>, Error>;
}
Expand description

A source of debug info that can be trusted to correspond to the current executable.

§Safety

Implementers of this trait must provide accurate debug info for this program.

Required Associated Types§

Source

type Reader: Reader<Offset = usize>

The type of the DWARF reader.

Required Methods§

Source

fn info_for(&self, fn_addr: u64) -> Result<DebugInfo<'_, Self::Reader>, Error>

Produces debug info for a given function.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§