OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
9 | 9 |
10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 ASSERT(!is_enabled_); | 26 ASSERT(!is_enabled_); |
27 const Code& code = Code::Handle(code_); | 27 const Code& code = Code::Handle(code_); |
28 const Instructions& instrs = Instructions::Handle(code.instructions()); | 28 const Instructions& instrs = Instructions::Handle(code.instructions()); |
29 { | 29 { |
30 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size()); | 30 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size()); |
31 switch (breakpoint_kind_) { | 31 switch (breakpoint_kind_) { |
32 case RawPcDescriptors::kIcCall: | 32 case RawPcDescriptors::kIcCall: |
33 case RawPcDescriptors::kUnoptStaticCall: { | 33 case RawPcDescriptors::kUnoptStaticCall: { |
34 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); | 34 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); |
35 CodePatcher::PatchStaticCallAt( | 35 CodePatcher::PatchStaticCallAt( |
36 pc_, code, StubCode::ICCallBreakpointEntryPoint()); | 36 pc_, code, StubCode::ICCallBreakpoint_entry()->EntryPoint()); |
37 break; | 37 break; |
38 } | 38 } |
39 case RawPcDescriptors::kRuntimeCall: { | 39 case RawPcDescriptors::kRuntimeCall: { |
40 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); | 40 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); |
41 CodePatcher::PatchStaticCallAt( | 41 CodePatcher::PatchStaticCallAt( |
42 pc_, code, StubCode::RuntimeCallBreakpointEntryPoint()); | 42 pc_, code, StubCode::RuntimeCallBreakpoint_entry()->EntryPoint()); |
43 break; | 43 break; |
44 } | 44 } |
45 default: | 45 default: |
46 UNREACHABLE(); | 46 UNREACHABLE(); |
47 } | 47 } |
48 } | 48 } |
49 is_enabled_ = true; | 49 is_enabled_ = true; |
50 } | 50 } |
51 | 51 |
52 | 52 |
(...skipping 13 matching lines...) Expand all Loading... |
66 default: | 66 default: |
67 UNREACHABLE(); | 67 UNREACHABLE(); |
68 } | 68 } |
69 } | 69 } |
70 is_enabled_ = false; | 70 is_enabled_ = false; |
71 } | 71 } |
72 | 72 |
73 } // namespace dart | 73 } // namespace dart |
74 | 74 |
75 #endif // defined TARGET_ARCH_IA32 | 75 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |