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

Unified Diff: runtime/vm/constants_arm.h

Issue 789903002: Complete and clean up breakpoint support in all 3 debuggers embedded in MIPS, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/constants_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constants_arm.h
===================================================================
--- runtime/vm/constants_arm.h (revision 42212)
+++ runtime/vm/constants_arm.h (working copy)
@@ -340,16 +340,12 @@
// Special Supervisor Call 24-bit codes used in the presence of the ARM
-// simulator for redirection, breakpoints, stop messages, and spill markers.
+// simulator for redirection, breakpoints, and stop messages.
// See /usr/include/asm/unistd.h
const uint32_t kRedirectionSvcCode = 0x90001f; // unused syscall, was sys_stty
const uint32_t kBreakpointSvcCode = 0x900020; // unused syscall, was sys_gtty
const uint32_t kStopMessageSvcCode = 0x9f0001; // __ARM_NR_breakpoint
-const uint32_t kSpillMarkerSvcBase = 0x9f0100; // unused ARM private syscall
-const uint32_t kWordSpillMarkerSvcCode = kSpillMarkerSvcBase + 1;
-const uint32_t kDWordSpillMarkerSvcCode = kSpillMarkerSvcBase + 2;
-
// Constants used for the decoding or encoding of the individual fields of
// instructions. Based on the "Figure 3-1 ARM instruction set summary".
enum InstructionFields {
@@ -450,13 +446,22 @@
static const int32_t kNopInstruction = // nop
((AL << kConditionShift) | (0x32 << 20) | (0xf << 12));
- static const int32_t kBreakPointInstruction = // svc #kBreakpointSvcCode
+
+ // Breakpoint instruction filling assembler code buffers in debug mode.
+ static const int32_t kBreakPointInstruction = // bkpt(0xdeb0)
+ ((AL << kConditionShift) | (0x12 << 20) | (0xdeb << 8) | (0x7 << 4));
+
+ // Breakpoint instruction used by the simulator.
+ // Should be distinct from kBreakPointInstruction and from a typical user
+ // breakpoint inserted in generated code for debugging, e.g. bkpt(0).
+ static const int32_t kSimulatorBreakpointInstruction =
+ // svc #kBreakpointSvcCode
((AL << kConditionShift) | (0xf << 24) | kBreakpointSvcCode);
- static const int kBreakPointInstructionSize = kInstrSize;
- bool IsBreakPoint() {
- return IsBkpt();
- }
+ // Runtime call redirection instruction used by the simulator.
+ static const int32_t kSimulatorRedirectInstruction =
+ ((AL << kConditionShift) | (0xf << 24) | kRedirectionSvcCode);
+
// Get the raw instruction bits.
inline int32_t InstructionBits() const {
return *reinterpret_cast<const int32_t*>(this);
« no previous file with comments | « runtime/vm/assembler_mips.cc ('k') | runtime/vm/constants_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698