2009-06-18 21:57:37 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
2011-12-12 07:25:32 +04:00
|
|
|
* Copyright 2011, Rene Gollent, rene@gollent.com.
|
2009-06-18 21:57:37 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef CPU_STATE_H
|
|
|
|
#define CPU_STATE_H
|
|
|
|
|
|
|
|
#include <OS.h>
|
|
|
|
|
|
|
|
#include <Referenceable.h>
|
2009-06-20 03:00:25 +04:00
|
|
|
#include <Variant.h>
|
2009-06-19 04:05:45 +04:00
|
|
|
|
2009-06-30 02:38:15 +04:00
|
|
|
#include "Types.h"
|
2009-06-20 21:20:49 +04:00
|
|
|
|
2009-06-19 04:05:45 +04:00
|
|
|
|
|
|
|
class Register;
|
|
|
|
|
2009-06-18 21:57:37 +04:00
|
|
|
|
2010-12-16 16:50:30 +03:00
|
|
|
class CpuState : public BReferenceable {
|
2009-06-18 21:57:37 +04:00
|
|
|
public:
|
|
|
|
virtual ~CpuState();
|
2009-06-19 04:05:45 +04:00
|
|
|
|
2013-05-17 05:22:24 +04:00
|
|
|
virtual status_t Clone(CpuState*& _clone) const = 0;
|
|
|
|
|
|
|
|
virtual status_t UpdateDebugState(void* state, size_t size)
|
|
|
|
const = 0;
|
|
|
|
|
2009-06-20 21:20:49 +04:00
|
|
|
virtual target_addr_t InstructionPointer() const = 0;
|
2013-05-17 05:22:24 +04:00
|
|
|
virtual void SetInstructionPointer(
|
|
|
|
target_addr_t address) = 0;
|
|
|
|
|
2011-12-12 07:25:32 +04:00
|
|
|
virtual target_addr_t StackFramePointer() const = 0;
|
|
|
|
virtual target_addr_t StackPointer() const = 0;
|
2009-06-19 04:05:45 +04:00
|
|
|
virtual bool GetRegisterValue(const Register* reg,
|
2009-07-13 22:45:49 +04:00
|
|
|
BVariant& _value) const = 0;
|
|
|
|
virtual bool SetRegisterValue(const Register* reg,
|
|
|
|
const BVariant& value) = 0;
|
2013-05-17 05:22:24 +04:00
|
|
|
|
2009-06-18 21:57:37 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CPU_STATE_H
|