diff options
| author | Rusty Wagner <rusty@vector35.com> | 2015-03-04 01:47:13 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2015-03-04 01:47:13 -0500 |
| commit | 5d0f774334c1bea3935001bf665d614c39a60d0f (patch) | |
| tree | 2feb0d74288139da69709b4b64c957a6e6247a40 /binaryninjaapi.h | |
| parent | c0fdb4320c771fec51e7675a2602ced3ca613500 (diff) | |
Add architecture to graph edges, and add edge routing data field for layout
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 2b0d53ad..63e8f1a5 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -424,7 +424,7 @@ namespace BinaryNinja public: BinaryViewType(const std::string& name, const std::string& longName); - virtual ~BinaryViewType(); + virtual ~BinaryViewType() {} static void Register(BinaryViewType* type); static Ref<BinaryViewType> GetByName(const std::string& name); @@ -613,7 +613,7 @@ namespace BinaryNinja struct InstructionInfo: public BNInstructionInfo { InstructionInfo(); - void AddBranch(BNBranchType type, uint64_t target = 0); + void AddBranch(BNBranchType type, uint64_t target = 0, Architecture* arch = nullptr); }; struct InstructionTextToken @@ -664,6 +664,13 @@ namespace BinaryNinja class Function; + struct BasicBlockEdge + { + BNBranchType type; + uint64_t target; + Ref<Architecture> arch; + }; + class BasicBlock: public RefCountObject { BNBasicBlock* m_block; @@ -679,7 +686,7 @@ namespace BinaryNinja uint64_t GetEnd() const; uint64_t GetLength() const; - std::vector<BNBasicBlockEdge> GetOutgoingEdges() const; + std::vector<BasicBlockEdge> GetOutgoingEdges() const; }; class FunctionGraph; @@ -693,7 +700,7 @@ namespace BinaryNinja ~Function(); BNFunction* GetFunctionObject() const { return m_func; } - + Ref<Architecture> GetArchitecture() const; uint64_t GetStart() const; @@ -708,6 +715,14 @@ namespace BinaryNinja std::vector<InstructionTextToken> tokens; }; + struct FunctionGraphEdge + { + BNBranchType type; + uint64_t target; + Ref<Architecture> arch; + std::vector<BNPoint> points; + }; + class FunctionGraphBlock: public RefCountObject { BNFunctionGraphBlock* m_block; @@ -724,7 +739,7 @@ namespace BinaryNinja int GetHeight() const; std::vector<FunctionGraphTextLine> GetLines() const; - std::vector<BNBasicBlockEdge> GetOutgoingEdges() const; + std::vector<FunctionGraphEdge> GetOutgoingEdges() const; }; class FunctionGraph: public RefCountObject |
