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
-040dc31406d580e33f82e578a840600fea5004ef
+63b766d67098877496a4b79d7f41e731fbe8abc8
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
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)))
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)))
# _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//'`