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

Add FreeBSD support #3

Merged
merged 2 commits into from
Jul 14, 2019
Merged

Conversation

akhramov
Copy link
Contributor

The library supports Linux, OSX and Windows, but not FreeBSD yet.

This change

  • Adds FreeBSD support via ptrace (2) PT_VM_ENTRY call.
  • Bumps libc crate version in order to get broader ptrace (2) call
    types support, namely PT_VM_ENTRY.
  • Adds Cirrus-backed FreeBSD CI. libc crate uses Cirrus for the very
    same purpose.
  • Adds mentions of FreeBSD in docstrings where appropriate.

The library supports Linux, OSX and Windows, but not FreeBSD yet.

This change
* Adds FreeBSD support via `ptrace (2)` `PT_VM_ENTRY` call.
* Bumps `libc` crate version in order to get broader `ptrace (2)` call
  types support, namely `PT_VM_ENTRY`.
* Adds Cirrus-backed FreeBSD CI. `libc` crate uses Cirrus for the very
  same purpose.
* Adds mentions of FreeBSD in docstrings where appropriate.
@akhramov akhramov mentioned this pull request May 10, 2019
3 tasks
@akhramov
Copy link
Contributor Author

In order to set Cirrus CI up, please follow the guide: https://cirrus-ci.org/guide/quick-start/

I'd be happy to assist.

src/freebsd_maps/mod.rs Outdated Show resolved Hide resolved
This change contains post-code review fixes, namely:

* implement `Drop` trait for `VmEntryIterator` in order to avoid
  possible error when the iterator is not exhausted and the tracee
  process remain attached.
* Move process locking logic to `VmEntryIterator::new`.
@benfred benfred merged commit 5154ffb into rbspy:master Jul 14, 2019
@benfred
Copy link
Collaborator

benfred commented Jul 14, 2019

Thanks for this! I've pushed a new version that includes these changes (0.1.6). Will get CI set up in a bit,

@akhramov
Copy link
Contributor Author

Alright, I have updated the py-spy PR accordingly, thanks!

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.

2 participants