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

proposal: x/sys/unix: PtraceGetRegs should allow getting non-default registers #62333

Open
mitar opened this issue Aug 28, 2023 · 1 comment
Open
Labels
Milestone

Comments

@mitar
Copy link
Contributor

mitar commented Aug 28, 2023

Currently unix.PtraceGetRegs only gets default set of registers, NT_PRSTATUS. It would be great if it would be possible to also get other sets. Probably we need another function for this. Example is that on arm, one needs to use NT_ARM_SYSTEM_CALL to get the system call register.

Similarly for setting registers.

Because ptracePtr is private, one has to duplicate it if you want to create a custom ptrace call.

@mitar mitar added the Proposal label Aug 28, 2023
@gopherbot gopherbot added this to the Proposal milestone Aug 28, 2023
@ianlancetaylor
Copy link
Contributor

Changing PtraceGetRegs would break too much existing code. In any case, it has the wrong type for receiving the register values. As far as I can see for each processor we have to define a struct type for each register set we want to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

3 participants