Skip to content

Get a thread list from an OSX task - #85

Merged
nbaksalyar merged 6 commits into
headcrab-rs:masterfrom
fabiim:list-threads-osx
Aug 17, 2020
Merged

Get a thread list from an OSX task#85
nbaksalyar merged 6 commits into
headcrab-rs:masterfrom
fabiim:list-threads-osx

Conversation

@fabiim

@fabiim fabiim commented Aug 16, 2020

Copy link
Copy Markdown
Contributor
  • Using the thread port as the id because we will need it to
    control the thread (as in delve).
  • Most mach threads belong to a pthread from which we can get the name.
    Couldn't find any other way. This doesn't resolve the main thread name.

Fa虂bio Botelho added 2 commits August 16, 2020 16:30
- Using the thread port as the id because we will need it to
control the thread (as in delve [1]).
- Most mach threads belong to a pthread from which we can get the name.
Couldn't find any other way. This doesn't resolve the main thread name.

[1] - https://github.com/go-delve/delve/blob/af250d45126070adbc702fe4ae1b74f19dcfdf97/pkg/proc/native/proc_darwin.go#L260
Comment thread src/target/macos.rs
Comment thread src/target/macos.rs Outdated
Comment thread src/target/macos.rs Outdated
Comment thread src/target/macos.rs Outdated
Comment thread src/target/macos.rs Outdated
fabiim and others added 3 commits August 16, 2020 18:10
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Comment thread src/target/macos.rs Outdated
Comment thread src/target/macos.rs
}

extern "C" {
// FIXME: Use libc > 0.2.74 when available

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean this will be in the next release of the libc crate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>

@nbaksalyar nbaksalyar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nbaksalyar
nbaksalyar merged commit f1fe924 into headcrab-rs:master Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants