syscall: ptrace fixes for s390
Fixes required now that we #include <linux/ptrace.h> in sysinfo.c. Patch by Andreas Krebbel. Reviewed-on: https://go-review.googlesource.com/46839 From-SVN: r249712
This commit is contained in:
parent
acea808abb
commit
f9dedc3f21
|
@ -1,4 +1,4 @@
|
|||
040dc31406d580e33f82e578a840600fea5004ef
|
||||
63b766d67098877496a4b79d7f41e731fbe8abc8
|
||||
|
||||
The first line of this file holds the git revision number of the last
|
||||
merge done from the gofrontend repository.
|
||||
|
|
|
@ -8,9 +8,9 @@ package syscall
|
|||
|
||||
import "unsafe"
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return uint64(r.Psw.Addr) }
|
||||
func (r *PtraceRegs) PC() uint64 { return uint64(r.Psw.addr) }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = uint32(pc) }
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.addr = uint32(pc) }
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
|
|
|
@ -8,9 +8,9 @@ package syscall
|
|||
|
||||
import "unsafe"
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Psw.addr }
|
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.addr = pc }
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
|
|
|
@ -310,17 +310,8 @@ upcase_fields () {
|
|||
# _user_regs_struct.
|
||||
regs=`grep '^type _user_regs_struct struct' gen-sysinfo.go || true`
|
||||
if test "$regs" = ""; then
|
||||
# s390
|
||||
regs=`grep '^type __user_regs_struct struct' gen-sysinfo.go || true`
|
||||
if test "$regs" != ""; then
|
||||
# Substructures of __user_regs_struct on s390
|
||||
upcase_fields "__user_psw_struct" "PtracePsw" >> ${OUT} || true
|
||||
upcase_fields "__user_fpregs_struct" "PtraceFpregs" >> ${OUT} || true
|
||||
upcase_fields "__user_per_struct" "PtracePer" >> ${OUT} || true
|
||||
else
|
||||
# mips*
|
||||
regs=`grep '^type _pt_regs struct' gen-sysinfo.go || true`
|
||||
fi
|
||||
# mips*
|
||||
regs=`grep '^type _pt_regs struct' gen-sysinfo.go || true`
|
||||
fi
|
||||
if test "$regs" != ""; then
|
||||
regs=`echo $regs | sed -e 's/type _pt_regs struct//'`
|
||||
|
|
Loading…
Reference in New Issue