Index: runtime/vm/debugger_x64.cc |
diff --git a/runtime/vm/debugger_x64.cc b/runtime/vm/debugger_x64.cc |
index 97fd052747934dc1345567bf570b14778d2f5184..b76469edd206ef1ea71911bc2c5227c5692c94d9 100644 |
--- a/runtime/vm/debugger_x64.cc |
+++ b/runtime/vm/debugger_x64.cc |
@@ -55,15 +55,33 @@ void CodeBreakpoint::PatchCode() { |
WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size()); |
switch (breakpoint_kind_) { |
case RawPcDescriptors::kIcCall: |
- case RawPcDescriptors::kUnoptStaticCall: |
- case RawPcDescriptors::kRuntimeCall: |
+ case RawPcDescriptors::kUnoptStaticCall: { |
+ int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); |
+ ASSERT((offset > 0) && ((offset % 8) == 7)); |
+ saved_value_ = static_cast<uword>(offset); |
+ const uint32_t stub_offset = |
+ InstructionPattern::OffsetFromPPIndex( |
+ Assembler::kICCallBreakpointCPIndex); |
+ CodePatcher::SetPoolOffsetAt(pc_, stub_offset); |
+ break; |
+ } |
case RawPcDescriptors::kClosureCall: { |
int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); |
ASSERT((offset > 0) && ((offset % 8) == 7)); |
saved_value_ = static_cast<uword>(offset); |
const uint32_t stub_offset = |
InstructionPattern::OffsetFromPPIndex( |
- Assembler::kBreakpointRuntimeCPIndex); |
+ Assembler::kClosureCallBreakpointCPIndex); |
+ CodePatcher::SetPoolOffsetAt(pc_, stub_offset); |
+ break; |
+ } |
+ case RawPcDescriptors::kRuntimeCall: { |
+ int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); |
+ ASSERT((offset > 0) && ((offset % 8) == 7)); |
+ saved_value_ = static_cast<uword>(offset); |
+ const uint32_t stub_offset = |
+ InstructionPattern::OffsetFromPPIndex( |
+ Assembler::kRuntimeCallBreakpointCPIndex); |
CodePatcher::SetPoolOffsetAt(pc_, stub_offset); |
break; |
} |