summaryrefslogtreecommitdiff
path: root/binaryninjacore.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2025-05-22 18:06:32 -0600
committerRusty Wagner <rusty.wagner@gmail.com>2025-05-23 19:30:52 -0600
commit98d81b780952c2c91fe686c55bb867d193472749 (patch)
treeab768c350bc5b717ca10970fc51555c5519749ca /binaryninjacore.h
parent6248965db87082e5f27a5f222a63d8eddeafe6fc (diff)
Add UI action and API to control expression folding
Diffstat (limited to 'binaryninjacore.h')
-rw-r--r--binaryninjacore.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index d5cc3238..ec03c1dd 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -1021,6 +1021,9 @@ extern "C"
// MLIL instruction appears to be an otherwise unused intermediate
MLILPossiblyUnusedIntermediate = 0x80,
+
+ // HLIL expression can be folded into other expressions or has been folded
+ HLILFoldableExpr = 0x100,
} BNILInstructionAttribute;
typedef enum BNIntrinsicClass
@@ -3226,6 +3229,13 @@ extern "C"
AllowDeadStoreElimination
} BNDeadStoreElimination;
+ typedef enum BNExprFolding
+ {
+ DefaultExprFolding,
+ PreventExprFolding,
+ AllowExprFolding
+ } BNExprFolding;
+
typedef struct BNDebugFunctionInfo
{
char* shortName;
@@ -4979,6 +4989,8 @@ extern "C"
BNFunction* func, const BNVariable* var);
BINARYNINJACOREAPI void BNSetFunctionVariableDeadStoreElimination(
BNFunction* func, const BNVariable* var, BNDeadStoreElimination mode);
+ BINARYNINJACOREAPI BNExprFolding BNGetExprFolding(BNFunction* func, uint64_t addr);
+ BINARYNINJACOREAPI void BNSetExprFolding(BNFunction* func, uint64_t addr, BNExprFolding mode);
BINARYNINJACOREAPI BNMergedVariable* BNGetMergedVariables(BNFunction* func, size_t* count);
BINARYNINJACOREAPI void BNFreeMergedVariableList(BNMergedVariable* vars, size_t count);
BINARYNINJACOREAPI void BNMergeVariables(BNFunction* func, const BNVariable* target, const BNVariable* sources,