Skip to content

Commit

Permalink
crates/sel4-backtrace/symbolize: Improve output style
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <nick@nickspinale.com>
  • Loading branch information
nspin committed Oct 25, 2024
1 parent 291174d commit 2d35028
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/sel4-backtrace/symbolize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ pub fn symbolize(
addrs: impl Iterator<Item = u64>,
) -> Result<(), fmt::Error> {
for probe in addrs {
write!(w, "0x{:016x}: ", probe)?;
write!(w, "{:#018x} ", probe)?;

if opts.do_functions || opts.do_inlines {
let mut printed_anything = false;
let mut frames = ctx.find_frames(probe).skip_all_loads().unwrap().peekable();
let mut first = true;
while let Some(frame) = frames.next().unwrap() {
if !first {
write!(w, " (inlined by) ")?;
write!(w, "{: >18} ", "(inlined by)")?;
}
first = false;

Expand All @@ -107,7 +107,7 @@ pub fn symbolize(
print_function(w, None, None, opts.demangle)?;
}

write!(w, " at ")?;
write!(w, " at ")?;
}

print_loc(w, frame.location.as_ref())?;
Expand All @@ -127,7 +127,7 @@ pub fn symbolize(

print_function(w, name, None, opts.demangle)?;

write!(w, " at ")?;
write!(w, " at ")?;
}

print_loc(w, None)?;
Expand Down

0 comments on commit 2d35028

Please sign in to comment.