2017-06-25 15:50:59 -04:00
|
|
|
#pragma once
|
2007-12-06 23:05:38 +00:00
|
|
|
|
2008-07-29 19:01:20 +00:00
|
|
|
#include <list>
|
2007-12-06 23:05:38 +00:00
|
|
|
#include "MIPS.h"
|
|
|
|
#include "BasicBlock.h"
|
|
|
|
|
|
|
|
class CMipsExecutor
|
|
|
|
{
|
|
|
|
public:
|
2012-03-13 06:16:33 +00:00
|
|
|
CMipsExecutor(CMIPS&, uint32);
|
2011-11-24 07:13:30 +00:00
|
|
|
virtual ~CMipsExecutor();
|
|
|
|
int Execute(int);
|
2012-03-13 06:16:33 +00:00
|
|
|
CBasicBlock* FindBlockAt(uint32) const;
|
|
|
|
CBasicBlock* FindBlockStartingAt(uint32) const;
|
|
|
|
void DeleteBlock(CBasicBlock*);
|
2011-11-24 07:13:30 +00:00
|
|
|
virtual void Reset();
|
2010-11-17 03:59:29 +00:00
|
|
|
void ClearActiveBlocks();
|
2015-06-07 23:44:46 -04:00
|
|
|
virtual void ClearActiveBlocksInRange(uint32, uint32);
|
2007-12-06 23:05:38 +00:00
|
|
|
|
2012-09-29 01:28:23 +00:00
|
|
|
#ifdef DEBUGGER_INCLUDED
|
|
|
|
bool MustBreak() const;
|
|
|
|
void DisableBreakpointsOnce();
|
|
|
|
#endif
|
|
|
|
|
2008-03-24 01:18:20 +00:00
|
|
|
protected:
|
2013-04-14 06:35:40 +00:00
|
|
|
typedef std::shared_ptr<CBasicBlock> BasicBlockPtr;
|
2011-11-24 07:13:30 +00:00
|
|
|
typedef std::list<BasicBlockPtr> BlockList;
|
2007-12-06 23:05:38 +00:00
|
|
|
|
2011-11-24 07:13:30 +00:00
|
|
|
void CreateBlock(uint32, uint32);
|
2010-11-17 03:59:29 +00:00
|
|
|
virtual BasicBlockPtr BlockFactory(CMIPS&, uint32, uint32);
|
2011-11-24 07:13:30 +00:00
|
|
|
virtual void PartitionFunction(uint32);
|
2015-06-07 23:44:46 -04:00
|
|
|
|
|
|
|
void ClearActiveBlocksInRangeInternal(uint32, uint32, CBasicBlock*);
|
2007-12-06 23:05:38 +00:00
|
|
|
|
2011-11-24 07:13:30 +00:00
|
|
|
BlockList m_blocks;
|
|
|
|
CMIPS& m_context;
|
2017-06-24 20:27:05 -04:00
|
|
|
uint32 m_maxAddress = 0;
|
2012-03-13 06:16:33 +00:00
|
|
|
|
2017-06-24 20:25:57 -04:00
|
|
|
CBasicBlock*** m_blockTable = nullptr;
|
|
|
|
uint32 m_subTableCount = 0;
|
2012-09-29 01:28:23 +00:00
|
|
|
|
|
|
|
#ifdef DEBUGGER_INCLUDED
|
2017-06-24 20:25:57 -04:00
|
|
|
bool m_breakpointsDisabledOnce = false;
|
2012-09-29 01:28:23 +00:00
|
|
|
#endif
|
2007-12-06 23:05:38 +00:00
|
|
|
};
|