| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #if defined(TARGET_ARCH_ARM64) | 9 #if defined(TARGET_ARCH_ARM64) |
| 10 | 10 |
| (...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 SimulatorDebugger dbg(this); | 1691 SimulatorDebugger dbg(this); |
| 1692 uint16_t imm = static_cast<uint16_t>(instr->Imm16Field()); | 1692 uint16_t imm = static_cast<uint16_t>(instr->Imm16Field()); |
| 1693 char buffer[32]; | 1693 char buffer[32]; |
| 1694 snprintf(buffer, sizeof(buffer), "brk #0x%x", imm); | 1694 snprintf(buffer, sizeof(buffer), "brk #0x%x", imm); |
| 1695 set_pc(get_pc() + Instr::kInstrSize); | 1695 set_pc(get_pc() + Instr::kInstrSize); |
| 1696 dbg.Stop(instr, buffer); | 1696 dbg.Stop(instr, buffer); |
| 1697 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) && | 1697 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) && |
| 1698 (instr->Bits(21, 3) == 2)) { | 1698 (instr->Bits(21, 3) == 2)) { |
| 1699 // Format(instr, "hlt 'imm16"); | 1699 // Format(instr, "hlt 'imm16"); |
| 1700 uint16_t imm = static_cast<uint16_t>(instr->Imm16Field()); | 1700 uint16_t imm = static_cast<uint16_t>(instr->Imm16Field()); |
| 1701 if (imm == Instr::kSimulatorMessageCode) { | 1701 if (imm == Instr::kStopMessageCode) { |
| 1702 SimulatorDebugger dbg(this); | 1702 SimulatorDebugger dbg(this); |
| 1703 const char* message = *reinterpret_cast<const char**>( | 1703 const char* message = *reinterpret_cast<const char**>( |
| 1704 reinterpret_cast<intptr_t>(instr) - 2 * Instr::kInstrSize); | 1704 reinterpret_cast<intptr_t>(instr) - 2 * Instr::kInstrSize); |
| 1705 set_pc(get_pc() + Instr::kInstrSize); | 1705 set_pc(get_pc() + Instr::kInstrSize); |
| 1706 dbg.Stop(instr, message); | 1706 dbg.Stop(instr, message); |
| 1707 } else if (imm == Instr::kSimulatorBreakCode) { | 1707 } else if (imm == Instr::kSimulatorBreakCode) { |
| 1708 SimulatorDebugger dbg(this); | 1708 SimulatorDebugger dbg(this); |
| 1709 dbg.Stop(instr, "breakpoint"); | 1709 dbg.Stop(instr, "breakpoint"); |
| 1710 } else if (imm == Instr::kSimulatorRedirectCode) { | 1710 } else if (imm == Instr::kSimulatorRedirectCode) { |
| 1711 DoRedirectedCall(instr); | 1711 DoRedirectedCall(instr); |
| (...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3494 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); | 3494 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); |
| 3495 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); | 3495 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); |
| 3496 buf->Longjmp(); | 3496 buf->Longjmp(); |
| 3497 } | 3497 } |
| 3498 | 3498 |
| 3499 } // namespace dart | 3499 } // namespace dart |
| 3500 | 3500 |
| 3501 #endif // !defined(HOST_ARCH_ARM64) | 3501 #endif // !defined(HOST_ARCH_ARM64) |
| 3502 | 3502 |
| 3503 #endif // defined TARGET_ARCH_ARM64 | 3503 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |