From f9dedc3f21020bcc704fcfb7caa1b04b5dc874e7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 27 Jun 2017 21:51:50 +0000 Subject: [PATCH] syscall: ptrace fixes for s390 Fixes required now that we #include in sysinfo.c. Patch by Andreas Krebbel. Reviewed-on: https://go-review.googlesource.com/46839 From-SVN: r249712 --- gcc/go/gofrontend/MERGE | 2 +- libgo/go/syscall/syscall_linux_s390.go | 4 ++-- libgo/go/syscall/syscall_linux_s390x.go | 4 ++-- libgo/mksysinfo.sh | 13 ++----------- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 583d6032e93..500ab5e2734 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/libgo/go/syscall/syscall_linux_s390.go b/libgo/go/syscall/syscall_linux_s390.go index a744f6b7841..d6d3f6ab892 100644 --- a/libgo/go/syscall/syscall_linux_s390.go +++ b/libgo/go/syscall/syscall_linux_s390.go @@ -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))) diff --git a/libgo/go/syscall/syscall_linux_s390x.go b/libgo/go/syscall/syscall_linux_s390x.go index 44d567983c8..f3701dc8f90 100644 --- a/libgo/go/syscall/syscall_linux_s390x.go +++ b/libgo/go/syscall/syscall_linux_s390x.go @@ -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))) diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 8fd8eadefc6..fe0bb545605 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -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//'` -- 2.30.2