1/* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Copyright 2011, Rene Gollent, rene@gollent.com. 4 * Distributed under the terms of the MIT License. 5 */ 6#ifndef CPU_STATE_H 7#define CPU_STATE_H 8 9#include <OS.h> 10 11#include <Referenceable.h> 12#include <Variant.h> 13 14#include "Types.h" 15 16 17class Register; 18 19 20class CpuState : public BReferenceable { 21public: 22 virtual ~CpuState(); 23 24 virtual status_t Clone(CpuState*& _clone) const = 0; 25 26 virtual status_t UpdateDebugState(void* state, size_t size) 27 const = 0; 28 29 virtual target_addr_t InstructionPointer() const = 0; 30 virtual void SetInstructionPointer( 31 target_addr_t address) = 0; 32 33 virtual target_addr_t StackFramePointer() const = 0; 34 virtual target_addr_t StackPointer() const = 0; 35 virtual bool GetRegisterValue(const Register* reg, 36 BVariant& _value) const = 0; 37 virtual bool SetRegisterValue(const Register* reg, 38 const BVariant& value) = 0; 39 40}; 41 42 43#endif // CPU_STATE_H 44