Skip to content
Snippets Groups Projects
Commit 5155b8fa authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

adding irdb-deep to irdb-sdk

Former-commit-id: 62b1c78a41e0436d450a8c86a72380f7f1d68ac7
parent 287e6677
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ files= '''
'''
cpppath='''
./include/
$IRDB_SDK/include/
'''
#CFLAGS="-fPIC "
......
......@@ -63,8 +63,8 @@ typedef enum {
// wrapper class around MEDS typing system
class MEDS_Arg {
public:
MEDS_Arg() { m_type = MEDS_TYPE_UNKNOWN; m_reg = rn_UNKNOWN; }
MEDS_Arg(int p_type, RegisterName p_reg = rn_UNKNOWN) { m_type = (MEDS_ArgType) p_type; m_reg = p_reg; }
MEDS_Arg() { m_type = MEDS_TYPE_UNKNOWN; m_reg = IRDB_SDK::rn_UNKNOWN; }
MEDS_Arg(int p_type, RegisterName p_reg = IRDB_SDK::rn_UNKNOWN) { m_type = (MEDS_ArgType) p_type; m_reg = p_reg; }
virtual ~MEDS_Arg() {}
bool isNumericType() { return m_type == MEDS_TYPE_NUMERIC; }
bool isPointerType() {
......
......@@ -23,25 +23,32 @@
#include <string>
#include <set>
#include <irdb-util>
namespace MEDS_Annotation
{
#if 0
enum RegisterName
{
rn_UNKNOWN,
rn_EFLAGS,
rn_RIP,
rn_EAX, rn_EBX, rn_ECX, rn_EDX, rn_ESI, rn_EDI, rn_EBP, rn_ESP, rn_R8D, rn_R9D, rn_R10D, rn_R11D, rn_R12D, rn_R13D, rn_R14D, rn_R15D,
rn_RAX, rn_RBX, rn_RCX, rn_RDX, rn_RBP, rn_RSP, rn_RSI, rn_RDI, rn_R8, rn_R9, rn_R10, rn_R11, rn_R12, rn_R13, rn_R14, rn_R15,
rn_AX, rn_BX, rn_CX, rn_DX, rn_BP, rn_SP, rn_SI, rn_DI, rn_R8W, rn_R9W, rn_R10W, rn_R11W, rn_R12W, rn_R13W, rn_R14W, rn_R15W,
rn_AH, rn_BH, rn_CH, rn_DH, rn_SIH, rn_DIH, rn_BPH, rn_SPH, /* 'H' versions of regs only exist for lower 8 regs */
rn_AL, rn_BL, rn_CL, rn_DL, rn_SIL, rn_DIL, rn_BPL, rn_SPL, rn_R8B, rn_R9B, rn_R10B, rn_R11B, rn_R12B, rn_R13B, rn_R14B, rn_R15B,
IRDB_SDK::rn_UNKNOWN,
IRDB_SDK::rn_EFLAGS,
IRDB_SDK::rn_RIP,
IRDB_SDK::rn_EAX, IRDB_SDK::rn_EBX, IRDB_SDK::rn_ECX, IRDB_SDK::rn_EDX, IRDB_SDK::rn_ESI, IRDB_SDK::rn_EDI, IRDB_SDK::rn_EBP, IRDB_SDK::rn_ESP, IRDB_SDK::rn_R8D, IRDB_SDK::rn_R9D, IRDB_SDK::rn_R10D, IRDB_SDK::rn_R11D, IRDB_SDK::rn_R12D, IRDB_SDK::rn_R13D, IRDB_SDK::rn_R14D, IRDB_SDK::rn_R15D,
IRDB_SDK::rn_RAX, IRDB_SDK::rn_RBX, IRDB_SDK::rn_RCX, IRDB_SDK::rn_RDX, IRDB_SDK::rn_RBP, IRDB_SDK::rn_RSP, IRDB_SDK::rn_RSI, IRDB_SDK::rn_RDI, IRDB_SDK::rn_R8, IRDB_SDK::rn_R9, IRDB_SDK::rn_R10, IRDB_SDK::rn_R11, IRDB_SDK::rn_R12, IRDB_SDK::rn_R13, IRDB_SDK::rn_R14, IRDB_SDK::rn_R15,
IRDB_SDK::rn_AX, IRDB_SDK::rn_BX, IRDB_SDK::rn_CX, IRDB_SDK::rn_DX, IRDB_SDK::rn_BP, IRDB_SDK::rn_SP, IRDB_SDK::rn_SI, IRDB_SDK::rn_DI, IRDB_SDK::rn_R8W, IRDB_SDK::rn_R9W, IRDB_SDK::rn_R10W, IRDB_SDK::rn_R11W, IRDB_SDK::rn_R12W, IRDB_SDK::rn_R13W, IRDB_SDK::rn_R14W, IRDB_SDK::rn_R15W,
IRDB_SDK::rn_AH, IRDB_SDK::rn_BH, IRDB_SDK::rn_CH, IRDB_SDK::rn_DH, IRDB_SDK::rn_SIH, IRDB_SDK::rn_DIH, IRDB_SDK::rn_BPH, IRDB_SDK::rn_SPH, /* 'H' versions of regs only exist for lower 8 regs */
IRDB_SDK::rn_AL, IRDB_SDK::rn_BL, IRDB_SDK::rn_CL, IRDB_SDK::rn_DL, IRDB_SDK::rn_SIL, IRDB_SDK::rn_DIL, IRDB_SDK::rn_BPL, IRDB_SDK::rn_SPL, IRDB_SDK::rn_R8B, IRDB_SDK::rn_R9B, IRDB_SDK::rn_R10B, IRDB_SDK::rn_R11B, IRDB_SDK::rn_R12B, IRDB_SDK::rn_R13B, IRDB_SDK::rn_R14B, IRDB_SDK::rn_R15B,
};
typedef std::set<RegisterName> RegisterSet_t;
#endif
using RegisterName = IRDB_SDK::RegisterID;
using RegisterName_t = IRDB_SDK::RegisterID_t;
using RegisterSet_t = std::set<RegisterName_t>;
class Register
......
......@@ -189,7 +189,7 @@ long long MEDS_FPTRShadowAnnotation::getConstantValue(bool &p_valid) const
// 80822cc 3 INSTR FPTRSHADOW EAX SHADOWID 6
bool MEDS_FPTRShadowAnnotation::isRegister() const
{
return Register::getRegister(getExpression()) != rn_UNKNOWN;
return Register::getRegister(getExpression()) != IRDB_SDK::rn_UNKNOWN;
}
// 805829d 3 INSTR FPTRCHECK [EBP-40] SHADOWID 5
......@@ -207,7 +207,7 @@ const RegisterName MEDS_FPTRShadowAnnotation::getRegister() const
}
else
{
return rn_UNKNOWN;
return IRDB_SDK::rn_UNKNOWN;
}
}
......@@ -226,7 +226,7 @@ uintptr_t MEDS_FPTRShadowAnnotation::computeRIPAddress()
parseRegister(getExpression().c_str(), &reg, &offset);
if (reg == rn_RIP)
if (reg == IRDB_SDK::rn_RIP)
{
return getVirtualOffset().getOffset() + getInstructionSize() + offset;
}
......
......@@ -64,8 +64,8 @@ void MEDS_InstructionCheckAnnotation::init()
m_bitWidth = -1;
m_truncationFromWidth = -1;
m_truncationToWidth = -1;
m_register = rn_UNKNOWN;
m_register2 = rn_UNKNOWN;
m_register = IRDB_SDK::rn_UNKNOWN;
m_register2 = IRDB_SDK::rn_UNKNOWN;
m_stackOffset = -1;
m_objectSize = -1;
m_isEspOffset = false;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment