Index: runtime/vm/debugger_x64.cc |
diff --git a/runtime/vm/debugger_x64.cc b/runtime/vm/debugger_x64.cc |
index 171a0b39d00112d25404a152e6261b9b731e6d7a..54565f156940374c5ec7c39d088d0917b2e92954 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 PcDescriptors::kIcCall: |
- case PcDescriptors::kUnoptStaticCall: |
- case PcDescriptors::kRuntimeCall: |
+ case PcDescriptors::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); |
Florian Schneider
2014/06/30 09:00:40
Why use the constant pool here?
So ARM and MIPS h
rmacnak
2014/07/01 01:08:51
Not sure. Was introduced in https://codereview.chr
rmacnak
2014/07/09 21:23:46
The difference is x64/arm64 reuse constant pool en
|
+ break; |
+ } |
case PcDescriptors::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 PcDescriptors::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; |
} |