Commit 7c412e96 authored by Shenghou Ma's avatar Shenghou Ma

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

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6763043
parent 438ed182
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment