diff options
author | Santo Cariotti <santo@dcariotti.me> | 2023-10-20 08:49:20 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2023-10-20 08:50:21 +0200 |
commit | cd4920a2903656a9fdda6ebc99ac6a0663095d83 (patch) | |
tree | 1fca27fd7b666099e2542e50c11aae9e80f6dab2 /src/registers.rs | |
parent | 4926d71dacff261e7de1dfea4a1255c6b97cee46 (diff) |
Use `name` instead of `rax` for showing the syscall name
Diffstat (limited to 'src/registers.rs')
-rw-r--r-- | src/registers.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/registers.rs b/src/registers.rs index 5832bc5..27ca8ea 100644 --- a/src/registers.rs +++ b/src/registers.rs @@ -41,7 +41,7 @@ impl RegistersData { } /// Return the rax name as syscall name - pub fn rax(&self) -> &str { + pub fn name(&self) -> &str { syscall_name(self.orig_rax) } @@ -50,7 +50,7 @@ impl RegistersData { format!( "[{}]: {}({:x}, {:x}, {:x}, ...) = {:x}", self.date(), - self.rax().bold(), + self.name().bold(), self.rdi, self.rsi, self.rdx, @@ -63,7 +63,7 @@ impl RegistersData { Line::from(vec![ Span::raw(format!("[{}]: ", self.date())), Span::styled( - format!("{}", self.rax()), + format!("{}", self.name()), Style::default().add_modifier(Modifier::BOLD), ), Span::raw(format!( |