Index: runtime/vm/debugger_ia32.cc |
diff --git a/runtime/vm/debugger_ia32.cc b/runtime/vm/debugger_ia32.cc |
index cc1c63d47c5077634337013175ef4809282957f5..408c8387f70d940d7175d85ae5c06194b1d7f11e 100644 |
--- a/runtime/vm/debugger_ia32.cc |
+++ b/runtime/vm/debugger_ia32.cc |
@@ -17,7 +17,7 @@ |
namespace dart { |
-RawCode* CodeBreakpoint::OrigStubAddress() const { |
+uword CodeBreakpoint::OrigStubAddress() const { |
return saved_value_; |
} |
@@ -26,25 +26,25 @@ void CodeBreakpoint::PatchCode() { |
ASSERT(!is_enabled_); |
const Code& code = Code::Handle(code_); |
const Instructions& instrs = Instructions::Handle(code.instructions()); |
- Code& stub_target = Code::Handle(); |
{ |
WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size()); |
switch (breakpoint_kind_) { |
case RawPcDescriptors::kIcCall: |
case RawPcDescriptors::kUnoptStaticCall: { |
- stub_target = StubCode::ICCallBreakpoint_entry()->code(); |
+ saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); |
+ CodePatcher::PatchStaticCallAt( |
+ pc_, code, StubCode::ICCallBreakpoint_entry()->EntryPoint()); |
break; |
} |
case RawPcDescriptors::kRuntimeCall: { |
saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); |
- stub_target = StubCode::RuntimeCallBreakpoint_entry()->code(); |
+ CodePatcher::PatchStaticCallAt( |
+ pc_, code, StubCode::RuntimeCallBreakpoint_entry()->EntryPoint()); |
break; |
} |
default: |
UNREACHABLE(); |
} |
- saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); |
- CodePatcher::PatchStaticCallAt(pc_, code, stub_target); |
} |
is_enabled_ = true; |
} |
@@ -60,7 +60,7 @@ void CodeBreakpoint::RestoreCode() { |
case RawPcDescriptors::kIcCall: |
case RawPcDescriptors::kUnoptStaticCall: |
case RawPcDescriptors::kRuntimeCall: { |
- CodePatcher::PatchStaticCallAt(pc_, code, Code::Handle(saved_value_)); |
+ CodePatcher::PatchStaticCallAt(pc_, code, saved_value_); |
break; |
} |
default: |