We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
go version go1.8.1 linux/mips64le
Debian Stretch mips64el
Run this:
package main import ( "fmt" "os/exec" "runtime" "syscall" "golang.org/x/sys/unix" ) func main() { runtime.LockOSThread() cmd := exec.Command("/bin/true") cmd.SysProcAttr = &syscall.SysProcAttr{ Ptrace: true } err := cmd.Start() if err != nil { return } var status unix.WaitStatus _, err = unix.Wait4(cmd.Process.Pid, &status, 0, nil) if err != nil { return } var regs unix.PtraceRegs err = unix.PtraceGetRegs(cmd.Process.Pid, ®s) if err != nil { return } fmt.Printf("%#016x\n", regs.PC()) }
The initial program counter of /bin/true.
Always 0x0000000000000000
0x0000000000000000
Related: https://go-review.googlesource.com/c/43133/
The bug exists because the C structure unix.PtraceRegs is based on struct user but it should be using struct pt_regs on MIPS.
unix.PtraceRegs
struct user
struct pt_regs
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/43431 mentions this issue.
Sorry, something went wrong.
golang/sys@156c5a2
No branches or pull requests
What version of Go are you using (
go version
)?go version go1.8.1 linux/mips64le
What operating system and processor architecture are you using?
Debian Stretch mips64el
What did you do?
Run this:
What did you expect to see?
The initial program counter of /bin/true.
What did you see instead?
Always
0x0000000000000000
Related: https://go-review.googlesource.com/c/43133/
The bug exists because the C structure
unix.PtraceRegs
is based onstruct user
but it should be usingstruct pt_regs
on MIPS.The text was updated successfully, but these errors were encountered: