diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 9e025b7..19a9533 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,13 +37,14 @@ fn main() -> anyhow::Result<()> { Ok(Fork::Parent(child)) => Pid::from_raw(child), Err(err) => panic!("fork() failed: {err}"), }; - let output = trace(pid, args.file_to_print)?; - let lines = str::from_utf8(&output)?.trim(); + let registers = trace(pid, args.file_to_print)?; if !args.no_tui { - run_tui(pid, lines)?; + run_tui(pid, ®isters)?; } else { - writeln!(io::stdout(), "{lines}")?; + for line in registers { + writeln!(io::stdout(), "{}", line.output())?; + } } Ok(()) |