Skip to content

Commit

Permalink
refactor: rename SyscallArg to Expression
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma-s1n committed May 27, 2024
1 parent cc6cfe3 commit 525f534
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 192 deletions.
12 changes: 6 additions & 6 deletions src/strace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct Syscall {
pub pid: u32,
pub rel_ts: f64,
pub name: String,
pub args: Vec<SyscallArg>,
pub args: Vec<Expression>,
pub ret_val: SyscallRetVal,
}

Expand All @@ -27,7 +27,7 @@ pub enum BufferType {
}

#[derive(Debug, Clone, PartialEq)]
pub enum SyscallArg {
pub enum Expression {
Buffer {
value: Vec<u8>,
type_: BufferType,
Expand All @@ -36,15 +36,15 @@ pub enum SyscallArg {
value: IntegerExpression,
metadata: Option<Vec<u8>>,
},
Struct(HashMap<String, SyscallArg>),
Array(Vec<SyscallArg>),
Struct(HashMap<String, Expression>),
Array(Vec<Expression>),
Macro {
name: String,
args: Vec<SyscallArg>,
args: Vec<Expression>,
},
}

impl SyscallArg {
impl Expression {
pub fn metadata(&self) -> Option<&[u8]> {
match self {
Self::Integer { metadata, .. } => metadata.as_deref(),
Expand Down
Loading

0 comments on commit 525f534

Please sign in to comment.