libdebugger: Add accessor for cpu state size.

Architecture:
- Store and provide accessor for the size in bytes of the low-level
  debug_cpu_state size of the respective target CPU. Adjust subclasses
  to pass in the appropriate size information.
This commit is contained in:
Rene Gollent
2016-07-31 17:30:12 -04:00
parent b02ee147b1
commit 9c9c24ce08
4 changed files with 18 additions and 7 deletions
+8 -2
View File
@@ -1,6 +1,6 @@
/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2011-2015, Rene Gollent, [email protected].
* Copyright 2011-2016, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef ARCHITECTURE_H
@@ -50,12 +50,17 @@ enum {
class Architecture : public BReferenceable {
public:
Architecture(TeamMemory* teamMemory,
uint8 addressSize, bool bigEndian);
uint8 addressSize,
size_t debugCpuStateSize,
bool bigEndian);
virtual ~Architecture();
virtual status_t Init();
inline uint8 AddressSize() const { return fAddressSize; }
inline size_t DebugCpuStateSize() const
{ return fDebugCpuStateSize; }
inline bool IsBigEndian() const { return fBigEndian; }
inline bool IsHostEndian() const;
@@ -136,6 +141,7 @@ public:
protected:
TeamMemory* fTeamMemory;
uint8 fAddressSize;
size_t fDebugCpuStateSize;
bool fBigEndian;
};