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

std.os.linux: add ptrace and associated constants #14839

Closed
wants to merge 4 commits into from

Conversation

mllken
Copy link
Contributor

@mllken mllken commented Mar 8, 2023

Add support for the ptrace syscall on Linux.

  • The data argument can sometimes be used as an address, and sometimes as a bit mask, so the type is set to usize.
  • According to man ptrace(2), SPARC architecture reverses the data and addr arguments for some operations, so set addr's type to usize
  • A higher level API could later be added in os/ptrace.zig.

@mllken
Copy link
Contributor Author

mllken commented Mar 8, 2023

I reverted the high level API change, since the new function signature of the high level API didn't match the existing signature in os/ptrace.zig. I'll limit my changes to std.os.linux for now. PTAL

@ifreund
Copy link
Member

ifreund commented Mar 12, 2023

This is actually included in #14647 in 9fabd40. I'd rather just wait for that to be merged in order to avoid conflicts.

@mllken
Copy link
Contributor Author

mllken commented Mar 12, 2023

Ok! Makes sense, closing.

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