pub struct DebugNames<R> { /* private fields */ }Expand description
The DebugNames struct represents the DWARF 5 name index information
found in the .debug_names section.
The .debug_names section provides an index for efficiently finding
debugging information entries (DIEs) by name. It contains hash tables
that map names to DIE offsets, allowing debuggers to quickly locate
functions, variables, types, and other named entities.
Implementations§
Source§impl<'input, Endian> DebugNames<EndianSlice<'input, Endian>>where
Endian: Endianity,
impl<'input, Endian> DebugNames<EndianSlice<'input, Endian>>where
Endian: Endianity,
Sourcepub fn new(debug_names_section: &'input [u8], endian: Endian) -> Self
pub fn new(debug_names_section: &'input [u8], endian: Endian) -> Self
Construct a new DebugNames instance from the data in the .debug_names
section.
It is the caller’s responsibility to read the .debug_names section and
present it as a &[u8] slice. That means using some ELF loader on
Linux, a Mach-O loader on macOS, etc.
use gimli::{DebugNames, LittleEndian};
let debug_names =
DebugNames::new(read_debug_names_section_somehow(), LittleEndian);Source§impl<T> DebugNames<T>
impl<T> DebugNames<T>
Sourcepub fn borrow<'a, F, R>(&'a self, borrow: F) -> DebugNames<R>
pub fn borrow<'a, F, R>(&'a self, borrow: F) -> DebugNames<R>
Create a DebugNames section that references the data in self.
This is useful when R implements Reader but T does not.
Used by DwarfSections::borrow.
Source§impl<R: Reader> DebugNames<R>
impl<R: Reader> DebugNames<R>
Sourcepub fn headers(&self) -> NameIndexHeaderIter<R> ⓘ
pub fn headers(&self) -> NameIndexHeaderIter<R> ⓘ
Iterate over all name indexes in the .debug_names section.
Trait Implementations§
Source§impl<R: Clone> Clone for DebugNames<R>
impl<R: Clone> Clone for DebugNames<R>
Source§fn clone(&self) -> DebugNames<R>
fn clone(&self) -> DebugNames<R>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<R: Debug> Debug for DebugNames<R>
impl<R: Debug> Debug for DebugNames<R>
Source§impl<R: Default> Default for DebugNames<R>
impl<R: Default> Default for DebugNames<R>
Source§fn default() -> DebugNames<R>
fn default() -> DebugNames<R>
Source§impl<R> From<R> for DebugNames<R>
impl<R> From<R> for DebugNames<R>
Source§impl<R> Section<R> for DebugNames<R>
impl<R> Section<R> for DebugNames<R>
Source§fn section_name() -> &'static str
fn section_name() -> &'static str
Source§fn dwo_section_name() -> Option<&'static str>
fn dwo_section_name() -> Option<&'static str>
Source§fn xcoff_section_name() -> Option<&'static str>
fn xcoff_section_name() -> Option<&'static str>
Source§fn load<F, E>(f: F) -> Result<Self, E>
fn load<F, E>(f: F) -> Result<Self, E>
Source§fn dwp_range(&self, offset: u32, size: u32) -> Result<Self>where
R: Reader,
fn dwp_range(&self, offset: u32, size: u32) -> Result<Self>where
R: Reader,
.dwp file.Source§fn lookup_offset_id(&self, id: ReaderOffsetId) -> Option<(SectionId, R::Offset)>where
R: Reader,
fn lookup_offset_id(&self, id: ReaderOffsetId) -> Option<(SectionId, R::Offset)>where
R: Reader,
Reader for this section.