diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-01-10 16:37:58 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-01-10 16:37:58 (GMT) |
commit | 810de6edb44a18601d0a958be11e48252114d2ad (patch) | |
tree | faf8f3e478493151145ced9269a0236efe714c51 /src/analysis/disass/rank.c | |
parent | 585a2f345be7f58a6811f0eceda8c2b39e103deb (diff) |
Produced temporary code to handle routines without code.
Diffstat (limited to 'src/analysis/disass/rank.c')
-rw-r--r-- | src/analysis/disass/rank.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/analysis/disass/rank.c b/src/analysis/disass/rank.c index 758e15d..2ad1cdf 100644 --- a/src/analysis/disass/rank.c +++ b/src/analysis/disass/rank.c @@ -84,7 +84,7 @@ static bool rank_flow_block(GFlowBlock *block, BlockVisitOrder order, const GIns case ILT_EXEC_FLOW: case ILT_CATCH_EXCEPTION: target = G_FLOW_BLOCK(g_instr_block_find_by_addr(list, get_mrange_addr(range), true)); - assert(target != NULL); + //assert(target != NULL); break; case ILT_JUMP: @@ -106,7 +106,7 @@ static bool rank_flow_block(GFlowBlock *block, BlockVisitOrder order, const GIns case ILT_CASE_JUMP: target = G_FLOW_BLOCK(g_instr_block_find_by_addr(links, get_mrange_addr(range), true)); - assert(target != NULL); + //assert(target != NULL); break; case ILT_JUMP_IF_TRUE: @@ -150,7 +150,7 @@ static bool rank_flow_block(GFlowBlock *block, BlockVisitOrder order, const GIns if (target == NULL) target = G_FLOW_BLOCK(g_instr_block_find_by_addr(list, get_mrange_addr(range), true)); - assert(target != NULL); + //assert(target != NULL); break; @@ -200,6 +200,10 @@ void rank_routines_blocks(GBinRoutine **routines, size_t count, GtkExtStatusBar { main_block = g_binary_routine_get_basic_blocks(routines[i]); + + if (main_block == NULL) continue; + + g_instr_block_visit(main_block, (instr_block_visitor_cb)rank_flow_block, main_block); |