summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2016-09-16 00:58:12 -0400
committerJordan Wiens <jordan@psifertex.com>2016-09-16 00:58:12 -0400
commitc334d84ff86c2bc3ce0298bdec79d5c6f5aa8b63 (patch)
tree533b57384862655b8a0cbbfcbd8d0678147aa97f /binaryninjaapi.h
parent978acef68bd6b023041f669e23e9faf8802760a7 (diff)
parent124cf1bc4f465a915621b7ac81af94b9a69a937a (diff)
Merge branch 'dev' of github.com:Vector35/binaryninja-api into dev
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index d4df479b..3400cca7 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -1561,6 +1561,18 @@ namespace BinaryNinja
std::vector<std::vector<InstructionTextToken>> GetAnnotations();
std::vector<DisassemblyTextLine> GetDisassemblyText(DisassemblySettings* settings);
+
+ BNHighlightColor GetBasicBlockHighlight();
+ void SetAutoBasicBlockHighlight(BNHighlightColor color);
+ void SetAutoBasicBlockHighlight(BNHighlightStandardColor color, uint8_t alpha = 255);
+ void SetAutoBasicBlockHighlight(BNHighlightStandardColor color, BNHighlightStandardColor mixColor,
+ uint8_t mix, uint8_t alpha = 255);
+ void SetAutoBasicBlockHighlight(uint8_t r, uint8_t g, uint8_t b, uint8_t alpha = 255);
+ void SetUserBasicBlockHighlight(BNHighlightColor color);
+ void SetUserBasicBlockHighlight(BNHighlightStandardColor color, uint8_t alpha = 255);
+ void SetUserBasicBlockHighlight(BNHighlightStandardColor color, BNHighlightStandardColor mixColor,
+ uint8_t mix, uint8_t alpha = 255);
+ void SetUserBasicBlockHighlight(uint8_t r, uint8_t g, uint8_t b, uint8_t alpha = 255);
};
struct StackVariable
@@ -1633,6 +1645,7 @@ namespace BinaryNinja
bool NeedsUpdate() const;
std::vector<Ref<BasicBlock>> GetBasicBlocks() const;
+ Ref<BasicBlock> GetBasicBlockAtAddress(Architecture* arch, uint64_t addr) const;
void MarkRecentUse();
std::string GetCommentForAddress(uint64_t addr) const;
@@ -1692,6 +1705,22 @@ namespace BinaryNinja
void SetIntegerConstantDisplayType(Architecture* arch, uint64_t instrAddr, uint64_t value, size_t operand,
BNIntegerDisplayType type);
+ BNHighlightColor GetInstructionHighlight(Architecture* arch, uint64_t addr);
+ void SetAutoInstructionHighlight(Architecture* arch, uint64_t addr, BNHighlightColor color);
+ void SetAutoInstructionHighlight(Architecture* arch, uint64_t addr, BNHighlightStandardColor color,
+ uint8_t alpha = 255);
+ void SetAutoInstructionHighlight(Architecture* arch, uint64_t addr, BNHighlightStandardColor color,
+ BNHighlightStandardColor mixColor, uint8_t mix, uint8_t alpha = 255);
+ void SetAutoInstructionHighlight(Architecture* arch, uint64_t addr, uint8_t r, uint8_t g, uint8_t b,
+ uint8_t alpha = 255);
+ void SetUserInstructionHighlight(Architecture* arch, uint64_t addr, BNHighlightColor color);
+ void SetUserInstructionHighlight(Architecture* arch, uint64_t addr, BNHighlightStandardColor color,
+ uint8_t alpha = 255);
+ void SetUserInstructionHighlight(Architecture* arch, uint64_t addr, BNHighlightStandardColor color,
+ BNHighlightStandardColor mixColor, uint8_t mix, uint8_t alpha = 255);
+ void SetUserInstructionHighlight(Architecture* arch, uint64_t addr, uint8_t r, uint8_t g, uint8_t b,
+ uint8_t alpha = 255);
+
void Reanalyze();
void RequestAdvancedAnalysisData();
@@ -1731,6 +1760,7 @@ namespace BinaryNinja
public:
FunctionGraphBlock(BNFunctionGraphBlock* block);
+ Ref<BasicBlock> GetBasicBlock() const;
Ref<Architecture> GetArchitecture() const;
uint64_t GetStart() const;
uint64_t GetEnd() const;
@@ -2230,4 +2260,23 @@ namespace BinaryNinja
public:
virtual void AddMainThreadAction(MainThreadAction* action) = 0;
};
+
+ class BackgroundTask: public CoreRefCountObject<BNBackgroundTask,
+ BNNewBackgroundTaskReference, BNFreeBackgroundTask>
+ {
+ public:
+ BackgroundTask(BNBackgroundTask* task);
+ BackgroundTask(const std::string& initialText, bool canCancel);
+
+ bool CanCancel() const;
+ bool IsCancelled() const;
+ bool IsFinished() const;
+ std::string GetProgressText() const;
+
+ void Cancel();
+ void Finish();
+ void SetProgressText(const std::string& text);
+
+ static std::vector<Ref<BackgroundTask>> GetRunningTasks();
+ };
}