mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
fix linux 386 build
R=austin DELTA=140 (128 added, 0 deleted, 12 changed) OCL=34344 CL=34347
This commit is contained in:
parent
f2a8cd5ad9
commit
74bb34c107
5 changed files with 139 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue