mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 14:26:40 -04:00
unix: use struct pt_regs for PtraceRegs on mips
On mips, "struct user" bears no relation to the actual structure used by PTRACE_GETREGS. The real structure is "struct pt_regs" which is declared in asm/ptrace.h Fixes golang/go#20338. Change-Id: I604d27bd2b0a0903784380cbd3fa2fd9b9811fa5 Reviewed-on: https://go-review.googlesource.com/43431 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Ian Lance Taylor
parent
6b7068925c
commit
156c5a2da4
@@ -211,9 +211,9 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
return setrlimit(resource, &rl)
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return uint64(r.Regs[64]) }
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Epc }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = uint32(pc) }
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint32(length)
|
||||
|
||||
Reference in New Issue
Block a user