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

macos query process info wrong #25

Open
kekeimiku opened this issue Mar 23, 2024 · 0 comments
Open

macos query process info wrong #25

kekeimiku opened this issue Mar 23, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@kekeimiku
Copy link

fn main() {
    let pid = std::env::args().nth(1).unwrap().parse().unwrap();
    let maps = proc_maps::get_process_maps(pid).unwrap();
    for map in maps.into_iter().filter(|x| !x.is_write()) {
        println!(
            "{:x}-{:x} {:?}",
            map.start(),
            map.size() + map.start(),
            map.filename()
        )
    }
}

In the vmmap command, the filename obtained should be None.

proc-maps output:

...
108c80000-108cc0000 Some("/Users/****/UnityFramework")
...

vmmap command output:

...
VM_ALLOCATE                 108c80000-108cc0000    [  256K     0K     0K     0K] ---/rwx SM=NUL  
...

But for very small processes, such as print helloworld , proc-maps can get the filename correctly.

@acj acj added bug Something isn't working help wanted Extra attention is needed labels Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants