OLD | NEW |
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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
11 | 11 |
12 DEFINE_FLAG(bool, print_stop_message, true, "Print stop message."); | 12 DEFINE_FLAG(bool, print_stop_message, true, "Print stop message."); |
13 | 13 |
| 14 |
| 15 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) { |
| 16 ASSERT(Utils::IsAligned(data, 4)); |
| 17 ASSERT(Utils::IsAligned(length, 4)); |
| 18 const uword end = data + length; |
| 19 while (data < end) { |
| 20 *reinterpret_cast<int32_t*>(data) = Instr::kBreakPointInstruction; |
| 21 data += 4; |
| 22 } |
| 23 } |
| 24 |
14 } // namespace dart | 25 } // namespace dart |
15 | 26 |
16 #endif // defined TARGET_ARCH_MIPS | 27 #endif // defined TARGET_ARCH_MIPS |
17 | 28 |
OLD | NEW |