[−][src]Struct libdw::Dwarf
Methods
impl<'dw> Dwarf<'dw>
[src]
pub fn open<P: AsRef<Path>>(path: P) -> Result<Dwarf<'static>>
[src]
Open a Dwarf
from a path.
Examples
let exe = std::env::current_exe().unwrap(); let dw = libdw::Dwarf::open(exe).unwrap();
pub fn from_fd<FD: AsRawFd>(fd: &'dw FD) -> Result<Dwarf<'dw>>
[src]
Create a Dwarf
from an open file.
Examples
let exe = std::env::current_exe().unwrap(); let f = std::fs::File::open(exe).unwrap(); let dw = libdw::Dwarf::from_fd(&f).unwrap();
pub fn from_elf(elf: &'dw Elf) -> Result<Dwarf<'dw>>
[src]
Create a Dwarf
from an existing Elf
.
Examples
let exe = std::env::current_exe().unwrap(); let elf = libelf::Elf::open(exe).unwrap(); let dw = libdw::Dwarf::from_elf(&elf).unwrap();
pub unsafe fn from_raw(dwarf: *mut Dwarf) -> Dwarf<'dw>
[src]
Create a Dwarf
from a raw FFI pointer.
Safety
This function is unsafe because there is no guarantee that the given
pointer is a valid libdw
handle, nor whether the lifetime inferred
is appropriate. This does not take ownership of the underlying object,
so the caller must ensure it outlives the returned Dwarf
wrapper.
pub fn get_elf(&'dw self) -> Elf<'dw>
[src]
ⓘImportant traits for CompileUnits<'dw>pub fn compile_units(&'dw self) -> CompileUnits<'dw>
[src]
ⓘImportant traits for CompileUnits<'dw>
ⓘImportant traits for TypeUnits<'dw>pub fn type_units(&'dw self) -> TypeUnits<'dw>
[src]
ⓘImportant traits for TypeUnits<'dw>
pub fn as_ptr(&self) -> *mut Dwarf
[src]
Trait Implementations
Auto Trait Implementations
impl<'dw> !Send for Dwarf<'dw>
impl<'dw> Unpin for Dwarf<'dw>
impl<'dw> !Sync for Dwarf<'dw>
impl<'dw> !UnwindSafe for Dwarf<'dw>
impl<'dw> !RefUnwindSafe for Dwarf<'dw>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,