summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2017-12-04 13:23:26 -0500
committerBrian Potchik <brian@vector35.com>2017-12-04 13:23:26 -0500
commit10cf74045e1e2495813597a499dee4fb4baf601f (patch)
tree716528e1e20476c881d5b65b88ebb01097f34139
parent448ffe2842b2b1e0d21f905403489d3f865672d8 (diff)
Better Architecture Transition Support.
-rw-r--r--architecture.cpp1
-rw-r--r--binaryninjacore.h1
-rw-r--r--python/architecture.py2
-rw-r--r--python/function.py1
4 files changed, 5 insertions, 0 deletions
diff --git a/architecture.cpp b/architecture.cpp
index 17d02909..66372bcb 100644
--- a/architecture.cpp
+++ b/architecture.cpp
@@ -30,6 +30,7 @@ using namespace std;
InstructionInfo::InstructionInfo()
{
length = 0;
+ archTransitionByTargetAddr = false;
branchCount = 0;
branchDelay = false;
}
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 7a0e585e..1bb0c70a 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -973,6 +973,7 @@ extern "C"
{
size_t length;
size_t branchCount;
+ bool archTransitionByTargetAddr;
bool branchDelay;
BNBranchType branchType[BN_MAX_INSTRUCTION_BRANCHES];
uint64_t branchTarget[BN_MAX_INSTRUCTION_BRANCHES];
diff --git a/python/architecture.py b/python/architecture.py
index ed03a6e6..a893c1d4 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -462,6 +462,7 @@ class Architecture(object):
if info is None:
return False
result[0].length = info.length
+ result[0].archTransitionByTargetAddr = info.arch_transition_by_target_addr
result[0].branchDelay = info.branch_delay
result[0].branchCount = len(info.branches)
for i in xrange(0, len(info.branches)):
@@ -1163,6 +1164,7 @@ class Architecture(object):
return None
result = function.InstructionInfo()
result.length = info.length
+ result.arch_transition_by_target_addr = info.archTransitionByTargetAddr
result.branch_delay = info.branchDelay
for i in xrange(0, info.branchCount):
target = info.branchTarget[i]
diff --git a/python/function.py b/python/function.py
index e9e5dcc9..58bee8f4 100644
--- a/python/function.py
+++ b/python/function.py
@@ -1755,6 +1755,7 @@ class InstructionBranch(object):
class InstructionInfo(object):
def __init__(self):
self.length = 0
+ self.arch_transition_by_target_addr = False
self.branch_delay = False
self.branches = []