Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(829)

Side by Side Diff: src/debug/ia32/debug-ia32.cc

Issue 1491743005: [debugger] do not predict step in target for liveedit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@liveeditstep
Patch Set: do not prepare stepping if we are not in the debugger Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/liveedit.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/ia32/frames-ia32.h" 9 #include "src/ia32/frames-ia32.h"
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Now that the break point has been handled, resume normal execution by 99 // Now that the break point has been handled, resume normal execution by
100 // jumping to the target address intended by the caller and that was 100 // jumping to the target address intended by the caller and that was
101 // overwritten by the address of DebugBreakXXX. 101 // overwritten by the address of DebugBreakXXX.
102 ExternalReference after_break_target = 102 ExternalReference after_break_target =
103 ExternalReference::debug_after_break_target_address(masm->isolate()); 103 ExternalReference::debug_after_break_target_address(masm->isolate());
104 __ jmp(Operand::StaticVariable(after_break_target)); 104 __ jmp(Operand::StaticVariable(after_break_target));
105 } 105 }
106 106
107 107
108 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
109 masm->ret(0);
110 }
111
112
113 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 108 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
114 ExternalReference restarter_frame_function_slot =
115 ExternalReference::debug_restarter_frame_function_pointer_address(
116 masm->isolate());
117 __ mov(Operand::StaticVariable(restarter_frame_function_slot), Immediate(0));
118
119 // We do not know our frame height, but set esp based on ebp. 109 // We do not know our frame height, but set esp based on ebp.
120 __ lea(esp, Operand(ebp, -1 * kPointerSize)); 110 __ lea(esp, Operand(ebp, -1 * kPointerSize));
121 111
122 __ pop(edi); // Function. 112 __ pop(edi); // Function.
123 __ pop(ebp); 113 __ pop(ebp);
124 114
115 ParameterCount dummy(0);
116 __ FloodFunctionIfStepping(edi, no_reg, dummy, dummy);
117
125 // Load context from the function. 118 // Load context from the function.
126 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 119 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
127 120
128 // Clear new.target register as a safety measure. 121 // Clear new.target register as a safety measure.
129 __ mov(edx, masm->isolate()->factory()->undefined_value()); 122 __ mov(edx, masm->isolate()->factory()->undefined_value());
130 123
131 // Get function code. 124 // Get function code.
132 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 125 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
133 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); 126 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset));
134 __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); 127 __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize));
135 128
136 // Re-run JSFunction, edi is function, esi is context. 129 // Re-run JSFunction, edi is function, esi is context.
137 __ jmp(ebx); 130 __ jmp(ebx);
138 } 131 }
139 132
140 133
141 const bool LiveEdit::kFrameDropperSupported = true; 134 const bool LiveEdit::kFrameDropperSupported = true;
142 135
143 #undef __ 136 #undef __
144 137
145 } // namespace internal 138 } // namespace internal
146 } // namespace v8 139 } // namespace v8
147 140
148 #endif // V8_TARGET_ARCH_IA32 141 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/liveedit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698