Skip to content

Commit

Permalink
InlinedFn
Browse files Browse the repository at this point in the history
  • Loading branch information
d-e-s-o committed Sep 15, 2023
1 parent 7025a15 commit f0f88f1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/symbolize/symbolizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ impl CodeInfo {
}
}


/// A type representing an inlined function.
#[derive(Clone, Debug, PartialEq)]
pub struct InlinedFn {
/// The symbol name of the function.
pub name: String,
/// Source code location information for the call to the function.
pub code_info: Option<CodeInfo>,
}


/// The result of address symbolization by [`Symbolizer`].
#[derive(Clone, Debug, PartialEq)]
pub struct Sym {
Expand All @@ -126,6 +137,8 @@ pub struct Sym {
pub offset: usize,
/// Source code location information for the symbol.
pub code_info: Option<CodeInfo>,
/// Inlined function information for the symbolized address.
pub inlined: Vec<InlinedFn>,
/// The struct is non-exhaustive and open to extension.
pub(crate) _non_exhaustive: (),
}
Expand Down Expand Up @@ -269,6 +282,7 @@ impl Symbolizer {
addr: sym_addr,
offset: addr - sym_addr,
code_info,
inlined: Vec::new(),
_non_exhaustive: (),
};
let () = results.push(sym);
Expand Down

0 comments on commit f0f88f1

Please sign in to comment.