Struct gimli::DebugStr
[−]
[src]
pub struct DebugStr<R: Reader> { /* fields omitted */ }
The DebugStr
struct represents the DWARF strings
found in the .debug_str
section.
Methods
impl<'input, Endian> DebugStr<EndianBuf<'input, Endian>> where
Endian: Endianity,
[src]
Endian: Endianity,
fn new(debug_str_section: &'input [u8], endian: Endian) -> Self
[src]
Construct a new DebugStr
instance from the data in the .debug_str
section.
It is the caller's responsibility to read the .debug_str
section and
present it as a &[u8]
slice. That means using some ELF loader on
Linux, a Mach-O loader on OSX, etc.
use gimli::{DebugStr, LittleEndian}; let debug_str = DebugStr::new(read_debug_str_section_somehow(), LittleEndian);
impl<R: Reader> DebugStr<R>
[src]
fn get_str(&self, offset: DebugStrOffset<R::Offset>) -> Result<R>
[src]
Lookup a string from the .debug_str
section by DebugStrOffset.
use gimli::{DebugStr, DebugStrOffset, LittleEndian}; let debug_str = DebugStr::new(read_debug_str_section_somehow(), LittleEndian); println!("Found string {:?}", debug_str.get_str(debug_str_offset_somehow()));
Trait Implementations
impl<R: Debug + Reader> Debug for DebugStr<R>
[src]
impl<R: Clone + Reader> Clone for DebugStr<R>
[src]
fn clone(&self) -> DebugStr<R>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<R: Copy + Reader> Copy for DebugStr<R>
[src]
impl<R: Reader> Section<R> for DebugStr<R>
[src]
fn section_name() -> &'static str
[src]
Returns the ELF section name for this type.