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

Side by Side Diff: runtime/vm/assembler_x64.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/assembler_x64.h ('k') | runtime/vm/code_patcher.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } else { 50 } else {
51 object_pool_.AddObject(vacant, kNotPatchable); 51 object_pool_.AddObject(vacant, kNotPatchable);
52 } 52 }
53 53
54 if (stub_code->CallToRuntime_entry() != NULL) { 54 if (stub_code->CallToRuntime_entry() != NULL) {
55 object_pool_.AddExternalLabel(&stub_code->CallToRuntimeLabel(), 55 object_pool_.AddExternalLabel(&stub_code->CallToRuntimeLabel(),
56 kNotPatchable); 56 kNotPatchable);
57 } else { 57 } else {
58 object_pool_.AddObject(vacant, kNotPatchable); 58 object_pool_.AddObject(vacant, kNotPatchable);
59 } 59 }
60
61 // Create fixed object pool entries for debugger stubs.
62 if (stub_code->ICCallBreakpoint_entry() != NULL) {
63 index = object_pool_.AddExternalLabel(
64 &stub_code->ICCallBreakpointLabel(), kNotPatchable);
65 ASSERT(index == kICCallBreakpointCPIndex);
66 } else {
67 object_pool_.AddObject(vacant, kNotPatchable);
68 }
69 if (stub_code->ClosureCallBreakpoint_entry() != NULL) {
70 index = object_pool_.AddExternalLabel(
71 &stub_code->ClosureCallBreakpointLabel(), kNotPatchable);
72 ASSERT(index == kClosureCallBreakpointCPIndex);
73 } else {
74 object_pool_.AddObject(vacant, kNotPatchable);
75 }
76 if (stub_code->RuntimeCallBreakpoint_entry() != NULL) {
77 index = object_pool_.AddExternalLabel(
78 &stub_code->RuntimeCallBreakpointLabel(), kNotPatchable);
79 ASSERT(index == kRuntimeCallBreakpointCPIndex);
80 } else {
81 object_pool_.AddObject(vacant, kNotPatchable);
82 }
83 } 60 }
84 } 61 }
85 62
86 63
87 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { 64 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) {
88 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length); 65 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length);
89 } 66 }
90 67
91 68
92 void Assembler::call(Register reg) { 69 void Assembler::call(Register reg) {
(...skipping 3826 matching lines...) Expand 10 before | Expand all | Expand 10 after
3919 3896
3920 3897
3921 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3898 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3922 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3899 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3923 return xmm_reg_names[reg]; 3900 return xmm_reg_names[reg];
3924 } 3901 }
3925 3902
3926 } // namespace dart 3903 } // namespace dart
3927 3904
3928 #endif // defined TARGET_ARCH_X64 3905 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/code_patcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698