diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2022-12-13 22:46:39 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2023-01-03 10:41:46 -0500 |
| commit | ffafa54703d239414e616d88633736ced71b63a5 (patch) | |
| tree | 8158860a69828cdf529872b60084d1ce55ca8834 /binaryninjacore.h | |
| parent | 3681a37debf204cf2416a807a189865a3834f300 (diff) | |
Add instruction attributes to IL instructions
Diffstat (limited to 'binaryninjacore.h')
| -rw-r--r-- | binaryninjacore.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index 9c038104..ee4931b3 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -873,9 +873,22 @@ extern "C" FlowGraphShowsSecondaryRegisterHighlighting }; + enum BNILInstructionAttribute + { + // If present on a store instruction, allows elimination of variables associated with the store + ILAllowDeadStoreElimination = 1, + + // If present on a store instruction, prevents elimination of variables associated with the store + ILPreventDeadStoreElimination = 2, + + // Assumes that a variable assignment might be used in some way during MLIL translation + MLILAssumePossibleUse = 4 + }; + struct BNLowLevelILInstruction { BNLowLevelILOperation operation; + uint32_t attributes; size_t size; uint32_t flags; uint32_t sourceOperand; @@ -1184,6 +1197,7 @@ extern "C" struct BNMediumLevelILInstruction { BNMediumLevelILOperation operation; + uint32_t attributes; uint32_t sourceOperand; size_t size; uint64_t operands[5]; @@ -1349,6 +1363,7 @@ extern "C" struct BNHighLevelILInstruction { BNHighLevelILOperation operation; + uint32_t attributes; uint32_t sourceOperand; size_t size; uint64_t operands[5]; @@ -4797,6 +4812,7 @@ extern "C" BINARYNINJACOREAPI void BNUpdateLowLevelILOperand( BNLowLevelILFunction* func, size_t instr, size_t operandIndex, uint64_t value); BINARYNINJACOREAPI void BNReplaceLowLevelILExpr(BNLowLevelILFunction* func, size_t expr, size_t newExpr); + BINARYNINJACOREAPI void BNSetLowLevelILExprAttributes(BNLowLevelILFunction* func, size_t expr, uint32_t attributes); BINARYNINJACOREAPI void BNAddLowLevelILLabelForAddress( BNLowLevelILFunction* func, BNArchitecture* arch, uint64_t addr); @@ -4950,6 +4966,7 @@ extern "C" BINARYNINJACOREAPI void BNMarkMediumLevelILInstructionForRemoval(BNMediumLevelILFunction* func, size_t instr); BINARYNINJACOREAPI void BNReplaceMediumLevelILInstruction(BNMediumLevelILFunction* func, size_t instr, size_t expr); BINARYNINJACOREAPI void BNReplaceMediumLevelILExpr(BNMediumLevelILFunction* func, size_t expr, size_t newExpr); + BINARYNINJACOREAPI void BNSetMediumLevelILExprAttributes(BNMediumLevelILFunction* func, size_t expr, uint32_t attributes); BINARYNINJACOREAPI bool BNGetMediumLevelILExprText(BNMediumLevelILFunction* func, BNArchitecture* arch, size_t i, BNInstructionTextToken** tokens, size_t* count, BNDisassemblySettings* settings); @@ -5097,6 +5114,7 @@ extern "C" BINARYNINJACOREAPI void BNUpdateHighLevelILOperand( BNHighLevelILFunction* func, size_t instr, size_t operandIndex, uint64_t value); BINARYNINJACOREAPI void BNReplaceHighLevelILExpr(BNHighLevelILFunction* func, size_t expr, size_t newExpr); + BINARYNINJACOREAPI void BNSetHighLevelILExprAttributes(BNHighLevelILFunction* func, size_t expr, uint32_t attributes); BINARYNINJACOREAPI BNDisassemblyTextLine* BNGetHighLevelILExprText( BNHighLevelILFunction* func, size_t expr, bool asFullAst, size_t* count, BNDisassemblySettings* settings); |
