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

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

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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 | « runtime/vm/debugger_arm64.cc ('k') | runtime/vm/debugger_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 25 matching lines...) Expand all
36 const Instructions& instrs = Instructions::Handle(code.instructions()); 36 const Instructions& instrs = Instructions::Handle(code.instructions());
37 { 37 {
38 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.size()); 38 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.size());
39 saved_value_ = *CallInstructionFromReturnAddress(pc_); 39 saved_value_ = *CallInstructionFromReturnAddress(pc_);
40 switch (breakpoint_kind_) { 40 switch (breakpoint_kind_) {
41 case RawPcDescriptors::kIcCall: 41 case RawPcDescriptors::kIcCall:
42 case RawPcDescriptors::kUnoptStaticCall: { 42 case RawPcDescriptors::kUnoptStaticCall: {
43 // DebugBreak has an A operand matching the call it replaces. 43 // DebugBreak has an A operand matching the call it replaces.
44 // This ensures that Return instructions continue to work - as they 44 // This ensures that Return instructions continue to work - as they
45 // look at calls to figure out how many arguments to drop. 45 // look at calls to figure out how many arguments to drop.
46 *CallInstructionFromReturnAddress(pc_) = 46 *CallInstructionFromReturnAddress(pc_) = Bytecode::Encode(
47 Bytecode::Encode(Bytecode::kDebugBreak, 47 Bytecode::kDebugBreak, Bytecode::DecodeArgc(saved_value_), 0, 0);
48 Bytecode::DecodeArgc(saved_value_),
49 0,
50 0);
51 break; 48 break;
52 } 49 }
53 50
54 case RawPcDescriptors::kRuntimeCall: { 51 case RawPcDescriptors::kRuntimeCall: {
55 *CallInstructionFromReturnAddress(pc_) = Bytecode::kDebugBreak; 52 *CallInstructionFromReturnAddress(pc_) = Bytecode::kDebugBreak;
56 break; 53 break;
57 } 54 }
58 55
59 default: 56 default:
60 UNREACHABLE(); 57 UNREACHABLE();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 96 }
100 } 97 }
101 is_enabled_ = false; 98 is_enabled_ = false;
102 } 99 }
103 100
104 #endif // !PRODUCT 101 #endif // !PRODUCT
105 102
106 } // namespace dart 103 } // namespace dart
107 104
108 #endif // defined TARGET_ARCH_DBC 105 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/debugger_arm64.cc ('k') | runtime/vm/debugger_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698