diff options
Diffstat (limited to 'src/registers.rs')
-rw-r--r-- | src/registers.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/registers.rs b/src/registers.rs index ec2e12c..5832bc5 100644 --- a/src/registers.rs +++ b/src/registers.rs @@ -40,12 +40,17 @@ impl RegistersData { self.timestamp.format("%+").to_string() } + /// Return the rax name as syscall name + pub fn rax(&self) -> &str { + syscall_name(self.orig_rax) + } + /// Returns a good string which shows the output for a line pub fn output(&self) -> String { format!( "[{}]: {}({:x}, {:x}, {:x}, ...) = {:x}", self.date(), - syscall_name(self.orig_rax).bold(), + self.rax().bold(), self.rdi, self.rsi, self.rdx, @@ -58,7 +63,7 @@ impl RegistersData { Line::from(vec![ Span::raw(format!("[{}]: ", self.date())), Span::styled( - format!("{}", syscall_name(self.orig_rax)), + format!("{}", self.rax()), Style::default().add_modifier(Modifier::BOLD), ), Span::raw(format!( |