Index: runtime/vm/debugger_arm64.cc |
diff --git a/runtime/vm/debugger_arm64.cc b/runtime/vm/debugger_arm64.cc |
index 3fb7b88d79b586854226333044540c4723b88451..2a74ad6a53a26266ad1cfe0a315a0fe7f95200d3 100644 |
--- a/runtime/vm/debugger_arm64.cc |
+++ b/runtime/vm/debugger_arm64.cc |
@@ -53,15 +53,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 & 0x7) == 0)); |
+ 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 & 0x7) == 0)); |
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 & 0x7) == 0)); |
+ saved_value_ = static_cast<uword>(offset); |
+ const uint32_t stub_offset = |
+ InstructionPattern::OffsetFromPPIndex( |
+ Assembler::kRuntimeCallBreakpointCPIndex); |
CodePatcher::SetPoolOffsetAt(pc_, stub_offset); |
break; |
} |