Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMapPath::Vsys for /SYSV pseudo files #151

Merged
merged 4 commits into from Oct 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/process/mod.rs
Expand Up @@ -466,6 +466,8 @@ pub enum MMapPath {
Vsyscall,
/// An anonymous mapping as obtained via mmap(2).
Anonymous,
/// Shared memory segment
Vsys(i32),
/// Some other pseudo-path
Other(String),
}
Expand All @@ -490,6 +492,7 @@ impl MMapPath {
MMapPath::TStack(tid)
}
x if x.starts_with('[') && x.ends_with(']') => MMapPath::Other(x[1..x.len() - 1].to_string()),
x if x.starts_with("/SYSV") => MMapPath::Vsys(i32::from_str_radix(&x[5..13], 16)?), // 32bits as hex. /SYSVaabbccdd (deleted)
x => MMapPath::Path(PathBuf::from(x)),
})
}
Expand Down