From 390d5d27d4de6b7c9cb06b957a483bb2ab69f241 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Thu, 7 Jul 2022 21:03:29 -0400 Subject: Merge variables API/UI, variable liveness API for determining soundness of variable merges --- binaryninjaapi.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 8af70be6..7c73d066 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -5736,6 +5736,8 @@ namespace BinaryNinja { bool IsVariableUserDefinded(const Variable& var); Confidence> GetVariableType(const Variable& var); std::string GetVariableName(const Variable& var); + std::string GetVariableNameOrDefault(const Variable& var); + std::string GetLastSeenVariableNameOrDefault(const Variable& var); void SetAutoIndirectBranches( Architecture* sourceArch, uint64_t source, const std::vector& branches); @@ -5880,6 +5882,10 @@ namespace BinaryNinja { BNDeadStoreElimination GetVariableDeadStoreElimination(const Variable& var); void SetVariableDeadStoreElimination(const Variable& var, BNDeadStoreElimination mode); + std::map> GetMergedVariables(); + void MergeVariables(const Variable& target, const std::set& sources); + void UnmergeVariables(const Variable& target, const std::set& sources); + uint64_t GetHighestAddress(); uint64_t GetLowestAddress(); std::vector GetAddressRanges(); @@ -6755,6 +6761,8 @@ namespace BinaryNinja { } Ref CreateFunctionGraph(DisassemblySettings* settings = nullptr); + + std::set GetLiveInstructionsForVariable(const Variable& var, bool includeLastUse = true); }; struct HighLevelILInstruction; -- cgit v1.3.1