1
0
mirror of https://github.com/golang/go synced 2024-11-20 05:54:43 -07:00

syscall: implement (*PtraceRegs).PC() and SetPC()

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6763043
This commit is contained in:
Shenghou Ma 2012-10-25 13:41:04 +08:00
parent 438ed18202
commit 7c412e962c

View File

@ -170,10 +170,9 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
return setrlimit(resource, &rl)
}
// TODO(kaib): add support for tracing
func (r *PtraceRegs) PC() uint64 { return 0 }
func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
func (r *PtraceRegs) SetPC(pc uint64) {}
func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
func (iov *Iovec) SetLen(length int) {
iov.Len = uint32(length)