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

Unified Diff: runtime/vm/constants_mips.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/constants_arm64.h ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constants_mips.h
===================================================================
--- runtime/vm/constants_mips.h (revision 42212)
+++ runtime/vm/constants_mips.h (working copy)
@@ -459,16 +459,29 @@
static const int32_t kNopInstruction = 0;
// Reserved break instruction codes.
- static const int32_t kStopMessageCode = 1 << 16; // For Stop(message).
- static const int32_t kRedirectCode = 2 << 16; // For call redirection in sim.
- static const int32_t kMsgMessageCode = 3 << 16; // For trace message in sim.
- static const int32_t kSimulatorBreakCode = 4 << 16; // For breakpoint in sim.
+ static const int32_t kBreakPointCode = 0xdeb0; // For breakpoint.
+ static const int32_t kStopMessageCode = 0xdeb1; // For Stop(message).
+ static const int32_t kSimulatorMessageCode = 0xdeb2; // For trace msg in sim.
+ static const int32_t kSimulatorBreakCode = 0xdeb3; // For breakpoint in sim.
+ static const int32_t kSimulatorRedirectCode = 0xca11; // For redirection.
- // General breakpoint instruction: break(0), for user breakpoint and to fill
- // assembler code buffers in debug mode.
- static const int32_t kBreakPointInstruction =
+ static const int32_t kBreakPointZeroInstruction =
(SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift);
+ // Breakpoint instruction filling assembler code buffers in debug mode.
+ static const int32_t kBreakPointInstruction =
+ kBreakPointZeroInstruction | (kBreakPointCode << kBreakCodeShift);
+
+ // 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. break_(0).
+ static const int32_t kSimulatorBreakpointInstruction =
+ kBreakPointZeroInstruction | (kSimulatorBreakCode << kBreakCodeShift);
+
+ // Runtime call redirection instruction used by the simulator.
+ static const int32_t kSimulatorRedirectInstruction =
+ kBreakPointZeroInstruction | (kSimulatorRedirectCode << kBreakCodeShift);
+
// Get the raw instruction bits.
inline int32_t InstructionBits() const {
return *reinterpret_cast<const int32_t*>(this);
« no previous file with comments | « runtime/vm/constants_arm64.h ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698