Chromium Code Reviews| Index: src/mips/simulator-mips.h |
| diff --git a/src/mips/simulator-mips.h b/src/mips/simulator-mips.h |
| index 21476dccb5523b82020525f8cb26a1972aaf9e48..8d0d574496df733cc38609ce1e8837e02acaf53b 100644 |
| --- a/src/mips/simulator-mips.h |
| +++ b/src/mips/simulator-mips.h |
| @@ -289,6 +289,18 @@ class Simulator { |
| // Used for breakpoints and traps. |
| void SoftwareInterrupt(Instruction* instr); |
| + // Stop helper functions. |
|
Søren Thygesen Gjesse
2011/05/26 07:11:50
isWatchpoint with uppercase I (two more below).
|
| + bool isWatchpoint(uint32_t code); |
| + void PrintWatchpoint(uint32_t code); |
| + void HandleStop(uint32_t code, Instruction* instr); |
| + bool isStopInstruction(Instruction* instr); |
| + bool isEnabledStop(uint32_t code); |
| + void EnableStop(uint32_t code); |
| + void DisableStop(uint32_t code); |
| + void IncreaseStopCounter(uint32_t code); |
| + void PrintStopInfo(uint32_t code); |
| + |
| + |
| // Executes one instruction. |
| void InstructionDecode(Instruction* instr); |
| // Execute one instruction placed in a branch delay slot. |
| @@ -354,6 +366,19 @@ class Simulator { |
| // Registered breakpoints. |
| Instruction* break_pc_; |
| Instr break_instr_; |
| + |
| + // Stop is disabled if bit 31 is set. |
| + static const uint32_t kStopDisabledBit = 1 << 31; |
| + |
| + // A stop is enabled, meaning the simulator will stop when meeting the |
| + // instruction, if bit 31 of watched_stops[code].count is unset. |
| + // The value watched_stops[code].count & ~(1 << 31) indicates how many times |
| + // the breakpoint was hit or gone through. |
| + struct StopCountAndDesc { |
| + uint32_t count; |
| + char* desc; |
| + }; |
| + StopCountAndDesc watched_stops[kMaxStopCode + 1]; |
| }; |