| Index: src/x64/debug-x64.cc
|
| ===================================================================
|
| --- src/x64/debug-x64.cc (revision 4816)
|
| +++ src/x64/debug-x64.cc (working copy)
|
| @@ -181,10 +181,31 @@
|
| }
|
|
|
|
|
| +void Debug::GenerateSlot(MacroAssembler* masm) {
|
| + // Generate enough nop's to make space for a call instruction.
|
| + Label check_codesize;
|
| + __ bind(&check_codesize);
|
| + __ RecordDebugBreakSlot();
|
| + for (int i = 0; i < Assembler::kDebugBreakSlotLength; i++) {
|
| + __ nop();
|
| + }
|
| + ASSERT_EQ(Assembler::kDebugBreakSlotLength,
|
| + masm->SizeOfCodeGeneratedSince(&check_codesize));
|
| +}
|
| +
|
| +
|
| +void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) {
|
| + // In the places where a debug break slot is inserted no registers can contain
|
| + // object pointers.
|
| + Generate_DebugBreakCallHelper(masm, 0, false);
|
| +}
|
| +
|
| +
|
| void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
|
| masm->Abort("LiveEdit frame dropping is not supported on x64");
|
| }
|
|
|
| +
|
| void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
|
| masm->Abort("LiveEdit frame dropping is not supported on x64");
|
| }
|
| @@ -217,6 +238,28 @@
|
| Assembler::kJSReturnSequenceLength - Assembler::kCallInstructionLength);
|
| }
|
|
|
| +
|
| +bool BreakLocationIterator::IsDebugBreakAtSlot() {
|
| + ASSERT(IsDebugBreakSlot());
|
| + // Check whether the debug break slot instructions have been patched.
|
| + return !Assembler::IsNop(rinfo()->pc());
|
| +}
|
| +
|
| +
|
| +void BreakLocationIterator::SetDebugBreakAtSlot() {
|
| + ASSERT(IsDebugBreakSlot());
|
| + rinfo()->PatchCodeWithCall(
|
| + Debug::debug_break_slot()->entry(),
|
| + Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength);
|
| +}
|
| +
|
| +
|
| +void BreakLocationIterator::ClearDebugBreakAtSlot() {
|
| + ASSERT(IsDebugBreakSlot());
|
| + rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
|
| +}
|
| +
|
| +
|
| #endif // ENABLE_DEBUGGER_SUPPORT
|
|
|
| } } // namespace v8::internal
|
|
|