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<EndianSlice<'input, Endian>> where
Endian: Endianity, [src]
impl<'input, Endian> DebugStr<EndianSlice<'input, Endian>> where
Endian: Endianity, pub fn new(debug_str_section: &'input [u8], endian: Endian) -> Self[src]
pub fn new(debug_str_section: &'input [u8], endian: Endian) -> SelfConstruct 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]
impl<R: Reader> DebugStr<R>pub fn get_str(&self, offset: DebugStrOffset<R::Offset>) -> Result<R>[src]
pub fn get_str(&self, offset: DebugStrOffset<R::Offset>) -> Result<R>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: Debug + Reader> Debug for DebugStr<R>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<R: Clone + Reader> Clone for DebugStr<R>[src]
impl<R: Clone + Reader> Clone for DebugStr<R>fn clone(&self) -> DebugStr<R>[src]
fn clone(&self) -> DebugStr<R>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
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: Copy + Reader> Copy for DebugStr<R>impl<R: Reader> Section<R> for DebugStr<R>[src]
impl<R: Reader> Section<R> for DebugStr<R>fn section_name() -> &'static str[src]
fn section_name() -> &'static strReturns the ELF section name for this type.
impl<R: Reader> From<R> for DebugStr<R>[src]
impl<R: Reader> From<R> for DebugStr<R>