Struct gdb_command::stacktrace::StacktraceEntry
source · pub struct StacktraceEntry {
pub address: u64,
pub function: String,
pub module: String,
pub offset: u64,
pub debug: DebugInfo,
}
Expand description
StacktraceEntry
struct represents the information about one line of the stack trace.
Fields§
§address: u64
Function address
function: String
Function name
module: String
Module name
offset: u64
Offset in module
debug: DebugInfo
Debug information
Implementations§
source§impl StacktraceEntry
impl StacktraceEntry
sourcepub fn new<T: AsRef<str>>(entry: T) -> Result<StacktraceEntry>
pub fn new<T: AsRef<str>>(entry: T) -> Result<StacktraceEntry>
Examples found in repository?
src/stacktrace.rs (line 202)
192 193 194 195 196 197 198 199 200 201 202 203 204 205
fn from_gdb<T: AsRef<str>>(trace: T) -> error::Result<Stacktrace> {
let mut stacktrace = Stacktrace::new();
let mut entries = trace
.as_ref()
.lines()
.map(|s| s.trim().to_string())
.collect::<Vec<String>>();
entries.retain(|trace| !trace.is_empty());
for x in entries.iter() {
stacktrace.push(StacktraceEntry::new(&x.clone())?);
}
Ok(stacktrace)
}
Trait Implementations§
source§impl Clone for StacktraceEntry
impl Clone for StacktraceEntry
source§fn clone(&self) -> StacktraceEntry
fn clone(&self) -> StacktraceEntry
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 moresource§impl Debug for StacktraceEntry
impl Debug for StacktraceEntry
source§impl Default for StacktraceEntry
impl Default for StacktraceEntry
source§fn default() -> StacktraceEntry
fn default() -> StacktraceEntry
Returns the “default value” for a type. Read more