2008-09-18 03:15:49 +00:00
|
|
|
class CFunctionMap
|
|
|
|
{
|
2010-05-25 09:15:19 +00:00
|
|
|
protected:
|
|
|
|
typedef CCompiledFunc * PCCompiledFunc;
|
|
|
|
typedef PCCompiledFunc * PCCompiledFunc_TABLE;
|
|
|
|
|
|
|
|
CFunctionMap();
|
|
|
|
~CFunctionMap();
|
|
|
|
|
|
|
|
bool AllocateMemory ( void );
|
|
|
|
|
|
|
|
PCCompiledFunc_TABLE * m_FunctionTable;
|
|
|
|
|
|
|
|
/*public:
|
|
|
|
typedef CCompiledFunc * PCCompiledFunc;
|
|
|
|
typedef PCCompiledFunc * PCCompiledFunc_TABLE;
|
2008-09-18 03:15:49 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Reset ( bool AllocateMemory );
|
|
|
|
|
2010-05-25 09:15:19 +00:00
|
|
|
PCCompiledFunc_TABLE * m_FunctionTable;
|
2008-09-18 03:15:49 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
CFunctionMap ( void );
|
|
|
|
~CFunctionMap ( void );
|
|
|
|
|
2010-05-25 09:15:19 +00:00
|
|
|
CCompiledFunc * AddFunctionInfo ( DWORD vAddr, DWORD pAddr );
|
|
|
|
CCompiledFunc * FindFunction ( DWORD vAddr, int Length );
|
2008-09-18 03:15:49 +00:00
|
|
|
|
|
|
|
static void * __fastcall CFunctionMap::CompilerFindFunction( CFunctionMap * _this, DWORD vAddr );
|
2010-05-25 09:15:19 +00:00
|
|
|
inline CCompiledFunc * CFunctionMap::FindFunction( DWORD vAddr ) const
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2010-05-25 09:15:19 +00:00
|
|
|
PCCompiledFunc_TABLE table = m_FunctionTable[vAddr >> 0xC];
|
2008-09-18 03:15:49 +00:00
|
|
|
if (table)
|
|
|
|
{
|
2010-05-25 09:15:19 +00:00
|
|
|
PCCompiledFunc & info = table[(vAddr & 0xFFF) >> 2];
|
2008-09-18 03:15:49 +00:00
|
|
|
if (info != NULL)
|
|
|
|
{
|
|
|
|
return info;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2010-05-25 09:15:19 +00:00
|
|
|
PCCompiledFunc_TABLE * GetFunctionTable ( void ) { return m_FunctionTable; }
|
2008-09-18 03:15:49 +00:00
|
|
|
|
|
|
|
inline void Reset (void) { Reset(true); }
|
2010-05-25 09:15:19 +00:00
|
|
|
void Remove (CCompiledFunc * info);*/
|
2008-09-18 03:15:49 +00:00
|
|
|
};
|