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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/constants_arm64.h ('k') | runtime/vm/disassembler_arm64.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) 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 #ifndef VM_CONSTANTS_MIPS_H_ 5 #ifndef VM_CONSTANTS_MIPS_H_
6 #define VM_CONSTANTS_MIPS_H_ 6 #define VM_CONSTANTS_MIPS_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 class Instr { 453 class Instr {
454 public: 454 public:
455 enum { 455 enum {
456 kInstrSize = 4, 456 kInstrSize = 4,
457 }; 457 };
458 458
459 static const int32_t kNopInstruction = 0; 459 static const int32_t kNopInstruction = 0;
460 460
461 // Reserved break instruction codes. 461 // Reserved break instruction codes.
462 static const int32_t kStopMessageCode = 1 << 16; // For Stop(message). 462 static const int32_t kBreakPointCode = 0xdeb0; // For breakpoint.
463 static const int32_t kRedirectCode = 2 << 16; // For call redirection in sim. 463 static const int32_t kStopMessageCode = 0xdeb1; // For Stop(message).
464 static const int32_t kMsgMessageCode = 3 << 16; // For trace message in sim. 464 static const int32_t kSimulatorMessageCode = 0xdeb2; // For trace msg in sim.
465 static const int32_t kSimulatorBreakCode = 4 << 16; // For breakpoint in sim. 465 static const int32_t kSimulatorBreakCode = 0xdeb3; // For breakpoint in sim.
466 static const int32_t kSimulatorRedirectCode = 0xca11; // For redirection.
466 467
467 // General breakpoint instruction: break(0), for user breakpoint and to fill 468 static const int32_t kBreakPointZeroInstruction =
468 // assembler code buffers in debug mode. 469 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift);
470
471 // Breakpoint instruction filling assembler code buffers in debug mode.
469 static const int32_t kBreakPointInstruction = 472 static const int32_t kBreakPointInstruction =
470 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); 473 kBreakPointZeroInstruction | (kBreakPointCode << kBreakCodeShift);
474
475 // Breakpoint instruction used by the simulator.
476 // Should be distinct from kBreakPointInstruction and from a typical user
477 // breakpoint inserted in generated code for debugging, e.g. break_(0).
478 static const int32_t kSimulatorBreakpointInstruction =
479 kBreakPointZeroInstruction | (kSimulatorBreakCode << kBreakCodeShift);
480
481 // Runtime call redirection instruction used by the simulator.
482 static const int32_t kSimulatorRedirectInstruction =
483 kBreakPointZeroInstruction | (kSimulatorRedirectCode << kBreakCodeShift);
471 484
472 // Get the raw instruction bits. 485 // Get the raw instruction bits.
473 inline int32_t InstructionBits() const { 486 inline int32_t InstructionBits() const {
474 return *reinterpret_cast<const int32_t*>(this); 487 return *reinterpret_cast<const int32_t*>(this);
475 } 488 }
476 489
477 // Set the raw instruction bits to value. 490 // Set the raw instruction bits to value.
478 inline void SetInstructionBits(int32_t value) { 491 inline void SetInstructionBits(int32_t value) {
479 *reinterpret_cast<int32_t*>(this) = value; 492 *reinterpret_cast<int32_t*>(this) = value;
480 } 493 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 #endif // defined(DEBUG) 633 #endif // defined(DEBUG)
621 634
622 private: 635 private:
623 DISALLOW_ALLOCATION(); 636 DISALLOW_ALLOCATION();
624 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); 637 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
625 }; 638 };
626 639
627 } // namespace dart 640 } // namespace dart
628 641
629 #endif // VM_CONSTANTS_MIPS_H_ 642 #endif // VM_CONSTANTS_MIPS_H_
OLDNEW
« 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