diff options
author | Russ Cox <rsc@golang.org> | 2009-09-03 16:17:21 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-09-03 16:17:21 -0700 |
commit | c7029263b9aef503da2760efd5b7301e614e2065 (patch) | |
tree | a6edb679ca76e2cd96ac1355a22db006265fe2c4 /src/pkg/debug/proc/proc_linux.go | |
parent | 86efeab6687cffedafa31ff0e06ddc116d1df4e4 (diff) | |
download | golang-c7029263b9aef503da2760efd5b7301e614e2065.tar.gz |
fix linux 386 build
R=austin
DELTA=140 (128 added, 0 deleted, 12 changed)
OCL=34344
CL=34347
Diffstat (limited to 'src/pkg/debug/proc/proc_linux.go')
-rw-r--r-- | src/pkg/debug/proc/proc_linux.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/debug/proc/proc_linux.go b/src/pkg/debug/proc/proc_linux.go index 913b212a0..a3ee088ad 100644 --- a/src/pkg/debug/proc/proc_linux.go +++ b/src/pkg/debug/proc/proc_linux.go @@ -289,7 +289,7 @@ func (t *thread) logTrace(format string, args ...) { var regs syscall.PtraceRegs; err := t.ptraceGetRegs(®s); if err == nil { - fmt.Fprintf(os.Stderr, "@%x", regs.Rip); + fmt.Fprintf(os.Stderr, "@%x", regs.PC()); } } fmt.Fprint(os.Stderr, ": "); @@ -516,7 +516,7 @@ func (ev *debugEvent) doTrap() (threadState, os.Error) { return stopped, err; } - b, ok := t.proc.breakpoints[uintptr(regs.Rip)-uintptr(len(bpinst386))]; + b, ok := t.proc.breakpoints[uintptr(regs.PC())-uintptr(len(bpinst386))]; if !ok { // We must have hit a breakpoint that was actually in // the program. Leave the IP where it is so we don't @@ -526,9 +526,9 @@ func (ev *debugEvent) doTrap() (threadState, os.Error) { } t.breakpoint = b; - t.logTrace("at breakpoint %v, backing up PC from %#x", b, regs.Rip); + t.logTrace("at breakpoint %v, backing up PC from %#x", b, regs.PC()); - regs.Rip = uint64(b.pc); + regs.SetPC(uint64(b.pc)); err = t.ptraceSetRegs(®s); if err != nil { return stopped, err; @@ -997,7 +997,7 @@ func (p *process) Continue() os.Error { if err != nil { return err; } - if b, ok := p.breakpoints[uintptr(regs.Rip)]; ok { + if b, ok := p.breakpoints[uintptr(regs.PC())]; ok { t.logTrace("stepping over breakpoint %v", b); if err := t.stepAsync(ready); err != nil { return err; |