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

Side by Side Diff: runtime/vm/code_patcher_ia32.cc

Issue 1137313002: VM: Set breakpoints on x64 and arm64 without patching code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: re-upload from git workspace Created 5 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_patcher_arm64.cc ('k') | runtime/vm/code_patcher_mips.cc » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 void CodePatcher::PatchInstanceCallAt(uword return_address, 170 void CodePatcher::PatchInstanceCallAt(uword return_address,
171 const Code& code, 171 const Code& code,
172 uword new_target) { 172 uword new_target) {
173 ASSERT(code.ContainsInstructionAt(return_address)); 173 ASSERT(code.ContainsInstructionAt(return_address));
174 InstanceCall call(return_address); 174 InstanceCall call(return_address);
175 call.set_target(new_target); 175 call.set_target(new_target);
176 } 176 }
177 177
178 178
179 int32_t CodePatcher::GetPoolOffsetAt(uword return_address) {
180 UNREACHABLE();
181 return 0;
182 }
183
184
185 void CodePatcher::SetPoolOffsetAt(uword return_address, int32_t offset) {
186 UNREACHABLE();
187 }
188
189
190 void CodePatcher::InsertCallAt(uword start, uword target) { 179 void CodePatcher::InsertCallAt(uword start, uword target) {
191 // The inserted call should not overlap the lazy deopt jump code. 180 // The inserted call should not overlap the lazy deopt jump code.
192 ASSERT(start + CallPattern::InstructionLength() <= target); 181 ASSERT(start + CallPattern::InstructionLength() <= target);
193 *reinterpret_cast<uint8_t*>(start) = 0xE8; 182 *reinterpret_cast<uint8_t*>(start) = 0xE8;
194 CallPattern call(start); 183 CallPattern call(start);
195 call.SetTargetAddress(target); 184 call.SetTargetAddress(target);
196 CPU::FlushICache(start, CallPattern::InstructionLength()); 185 CPU::FlushICache(start, CallPattern::InstructionLength());
197 } 186 }
198 187
199 188
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 239
251 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { 240 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) {
252 ASSERT(code.ContainsInstructionAt(pc)); 241 ASSERT(code.ContainsInstructionAt(pc));
253 EdgeCounter counter(pc, code); 242 EdgeCounter counter(pc, code);
254 return counter.edge_counter(); 243 return counter.edge_counter();
255 } 244 }
256 245
257 } // namespace dart 246 } // namespace dart
258 247
259 #endif // defined TARGET_ARCH_IA32 248 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_arm64.cc ('k') | runtime/vm/code_patcher_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698