summaryrefslogtreecommitdiff
path: root/mediumlevelil.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-04-20 23:25:31 -0400
committerRusty Wagner <rusty@vector35.com>2017-04-20 23:25:31 -0400
commitd50d190f297afcb9621b39eb1d351e9eae96271b (patch)
tree1962dd1f0ecb6101f25b63f57cb638685937537c /mediumlevelil.cpp
parent0ed147b61a1418915c1e243e05aa05e736b6a73f (diff)
Renaming and adding variable identifiers
Diffstat (limited to 'mediumlevelil.cpp')
-rw-r--r--mediumlevelil.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/mediumlevelil.cpp b/mediumlevelil.cpp
index 4ec5d69e..0b420a82 100644
--- a/mediumlevelil.cpp
+++ b/mediumlevelil.cpp
@@ -75,27 +75,27 @@ ExprId MediumLevelILFunction::AddInstruction(size_t expr)
ExprId MediumLevelILFunction::SetVar(size_t size, const Variable& var, ExprId src)
{
- return AddExpr(MLIL_SET_VAR, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier, src);
+ return AddExpr(MLIL_SET_VAR, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage, src);
}
ExprId MediumLevelILFunction::SetVarField(size_t size, const Variable& var, int64_t offset, ExprId src)
{
- return AddExpr(MLIL_SET_VAR_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier,
+ return AddExpr(MLIL_SET_VAR_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage,
offset, src);
}
ExprId MediumLevelILFunction::SetVarSplit(size_t size, const Variable& high, const Variable& low, ExprId src)
{
- return AddExpr(MLIL_SET_VAR_SPLIT, size, ((uint64_t)high.type << 32) | (uint64_t)high.index, high.identifier,
- ((uint64_t)low.type << 32) | (uint64_t)low.index, low.identifier, src);
+ return AddExpr(MLIL_SET_VAR_SPLIT, size, ((uint64_t)high.type << 32) | (uint64_t)high.index, high.storage,
+ ((uint64_t)low.type << 32) | (uint64_t)low.index, low.storage, src);
}
ExprId MediumLevelILFunction::SetVarSSA(size_t size, const Variable& var, size_t varIndex, ExprId src)
{
- return AddExpr(MLIL_SET_VAR_SSA, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier,
+ return AddExpr(MLIL_SET_VAR_SSA, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage,
varIndex, src);
}
@@ -103,7 +103,7 @@ ExprId MediumLevelILFunction::SetVarSSA(size_t size, const Variable& var, size_t
ExprId MediumLevelILFunction::SetVarFieldSSA(size_t size, const Variable& var, size_t varIndex,
int64_t offset, ExprId src)
{
- return AddExpr(MLIL_SET_VAR_SSA_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier,
+ return AddExpr(MLIL_SET_VAR_SSA_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage,
varIndex, offset, src);
}
@@ -113,16 +113,16 @@ ExprId MediumLevelILFunction::SetVarSplitSSA(size_t size, const Variable& high,
{
return AddExpr(MLIL_SET_VAR_SPLIT_SSA, size,
AddExpr(MLIL_VAR_SPLIT_DEST_SSA, size, ((uint64_t)high.type << 32) | (uint64_t)high.index,
- high.identifier, highIndex),
+ high.storage, highIndex),
AddExpr(MLIL_VAR_SPLIT_DEST_SSA, size, ((uint64_t)low.type << 32) | (uint64_t)low.index,
- low.identifier, lowIndex), src);
+ low.storage, lowIndex), src);
}
ExprId MediumLevelILFunction::SetVarAliased(size_t size, const Variable& var, size_t destIndex,
size_t srcIndex, ExprId src)
{
- return AddExpr(MLIL_SET_VAR_ALIASED, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier,
+ return AddExpr(MLIL_SET_VAR_ALIASED, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage,
destIndex, srcIndex, src);
}
@@ -130,60 +130,60 @@ ExprId MediumLevelILFunction::SetVarAliased(size_t size, const Variable& var, si
ExprId MediumLevelILFunction::SetVarFieldAliased(size_t size, const Variable& var, size_t destIndex,
size_t srcIndex, int64_t offset, ExprId src)
{
- return AddExpr(MLIL_SET_VAR_ALIASED_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier,
+ return AddExpr(MLIL_SET_VAR_ALIASED_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage,
destIndex, srcIndex, offset, src);
}
ExprId MediumLevelILFunction::Var(size_t size, const Variable& var)
{
- return AddExpr(MLIL_VAR, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier);
+ return AddExpr(MLIL_VAR, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage);
}
ExprId MediumLevelILFunction::VarField(size_t size, const Variable& var, int64_t offset)
{
- return AddExpr(MLIL_VAR_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier, offset);
+ return AddExpr(MLIL_VAR_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage, offset);
}
ExprId MediumLevelILFunction::VarSSA(size_t size, const Variable& var, size_t varIndex)
{
- return AddExpr(MLIL_VAR_SSA, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier, varIndex);
+ return AddExpr(MLIL_VAR_SSA, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage, varIndex);
}
ExprId MediumLevelILFunction::VarFieldSSA(size_t size, const Variable& var, int64_t offset,
size_t varIndex)
{
- return AddExpr(MLIL_VAR_SSA_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier,
+ return AddExpr(MLIL_VAR_SSA_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage,
offset, varIndex);
}
ExprId MediumLevelILFunction::VarAliased(size_t size, const Variable& var, size_t memIndex)
{
- return AddExpr(MLIL_VAR_ALIASED, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier, memIndex);
+ return AddExpr(MLIL_VAR_ALIASED, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage, memIndex);
}
ExprId MediumLevelILFunction::VarFieldAliased(size_t size, const Variable& var, int64_t offset, size_t memIndex)
{
- return AddExpr(MLIL_VAR_ALIASED_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier,
+ return AddExpr(MLIL_VAR_ALIASED_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage,
offset, memIndex);
}
ExprId MediumLevelILFunction::AddressOf(size_t size, const Variable& var)
{
- return AddExpr(MLIL_ADDRESS_OF, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.identifier);
+ return AddExpr(MLIL_ADDRESS_OF, size, ((uint64_t)var.type << 32) | (uint64_t)var.index, var.storage);
}
ExprId MediumLevelILFunction::AddressOfField(size_t size, const Variable& var, int64_t offset)
{
return AddExpr(MLIL_ADDRESS_OF_FIELD, size, ((uint64_t)var.type << 32) | (uint64_t)var.index,
- var.identifier, offset);
+ var.storage, offset);
}
@@ -245,7 +245,7 @@ Variable MediumLevelILFunction::GetVariable(ExprId i, size_t varOperand)
Variable result;
result.type = (BNVariableSourceType)(instr.operands[varOperand] >> 32);
result.index = (uint32_t)instr.operands[varOperand];
- result.identifier = instr.operands[varOperand + 1];
+ result.storage = instr.operands[varOperand + 1];
return result;
}