Struct libdw::Dwarf [] [src]

pub struct Dwarf<'dw> { /* fields omitted */ }

Methods

impl<'dw> Dwarf<'dw>
[src]

Open a Dwarf from a path.

Examples

let exe = std::env::current_exe().unwrap();
let dw = libdw::Dwarf::open(exe).unwrap();

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();

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();

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.

Trait Implementations

impl<'dw> Debug for Dwarf<'dw>
[src]

Formats the value using the given formatter.

impl<'dw> Drop for Dwarf<'dw>
[src]

A method called when the value goes out of scope. Read more