Struct gimli::DebugStr [] [src]

pub struct DebugStr<'input, Endian> where Endian: Endianity { /* fields omitted */ }

The DebugStr struct represents the DWARF strings found in the .debug_str section.

Methods

impl<'input, Endian> DebugStr<'input, Endian> where Endian: Endianity
[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::<LittleEndian>::new(read_debug_str_section_somehow());

Lookup a string from the .debug_str section by DebugStrOffset.

use gimli::{DebugStr, DebugStrOffset, LittleEndian};

let debug_str = DebugStr::<LittleEndian>::new(read_debug_str_section_somehow());
println!("Found string {:?}", debug_str.get_str(debug_str_offset_somehow()));

Trait Implementations

impl<'input, Endian: Debug> Debug for DebugStr<'input, Endian> where Endian: Endianity
[src]

Formats the value using the given formatter.

impl<'input, Endian: Clone> Clone for DebugStr<'input, Endian> where Endian: Endianity
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'input, Endian: Copy> Copy for DebugStr<'input, Endian> where Endian: Endianity
[src]