pub struct SourceInformation {
pub directory: Option<String>,
pub file: Option<String>,
pub line: Option<NonZeroU64>,
pub column: Option<NonZeroU64>,
}
Expand description
Contains all the information about where the code was declared in the source code.
Fields§
§directory: Option<String>
The source code directory where the debug information was declared.
file: Option<String>
The relative source code file path where the debug information was declared.
line: Option<NonZeroU64>
The source code line number where the debug information was declared.
column: Option<NonZeroU64>
The source code column number where the debug information was declared.
Implementations§
Source§impl SourceInformation
impl SourceInformation
Sourcepub fn get_die_source_information<R: Reader<Offset = usize>>(
dwarf: &Dwarf<R>,
unit: &Unit<R>,
die: &DebuggingInformationEntry<'_, '_, R>,
cwd: &str,
) -> Result<SourceInformation>
pub fn get_die_source_information<R: Reader<Offset = usize>>( dwarf: &Dwarf<R>, unit: &Unit<R>, die: &DebuggingInformationEntry<'_, '_, R>, cwd: &str, ) -> Result<SourceInformation>
Retrieves the information about where the given DIE was declared in the source code.
Description:
dwarf
- A reference to gimli-rsDwarf
struct.unit
- A reference to gimli-rsUnit
struct, which the given DIE is located in.die
- A reference to the DIE containing attributes starting withDW_AT_decl_
.cwd
- The work directory of the debugged program.
This function will retrieve the information stored in the attributes starting with
DW_AT_decl_
from the given DIE>
pub fn get_from_address<R: Reader<Offset = usize>>( dwarf: &Dwarf<R>, address: u64, cwd: &str, ) -> Result<SourceInformation>
Trait Implementations§
Source§impl Clone for SourceInformation
impl Clone for SourceInformation
Source§fn clone(&self) -> SourceInformation
fn clone(&self) -> SourceInformation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SourceInformation
impl RefUnwindSafe for SourceInformation
impl Send for SourceInformation
impl Sync for SourceInformation
impl Unpin for SourceInformation
impl UnwindSafe for SourceInformation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more