Kill anal.bb.align variable ##refactor

This commit is contained in:
radare 2018-10-25 15:34:09 +02:00 committed by GitHub
parent 3050203ac0
commit 2420cb53d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 10 deletions

View File

@ -13,6 +13,7 @@
#define JMPTBLSZ 512
#define JMPTBL_LEA_SEARCH_SZ 64
#define JMPTBL_MAXFCNSIZE 4096
#define BB_ALIGN 0x10
/* speedup analysis by removing some function overlapping checks */
#define JAYRO_04 0
@ -1625,7 +1626,7 @@ R_API int r_anal_fcn(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut64
r_list_foreach (fcn->bbs, iter, bb) {
if (endaddr == bb->addr) {
endaddr += bb->size;
} else if (endaddr < bb->addr && bb->addr - endaddr < anal->opt.bbs_alignment) {
} else if (endaddr < bb->addr && bb->addr - endaddr < BB_ALIGN) {
endaddr = bb->addr + bb->size;
} else {
break;

View File

@ -2190,13 +2190,6 @@ static int cb_anal_brokenrefs(void *user, void *data) {
return true;
}
static int cb_anal_bbs_alignment(void *user, void *data) {
RCore *core = (RCore*) user;
RConfigNode *node = (RConfigNode*) data;
core->anal->opt.bbs_alignment = node->i_value;
return true;
}
static int cb_anal_bb_max_size(void *user, void *data) {
RCore *core = (RCore*) user;
RConfigNode *node = (RConfigNode*) data;
@ -2390,7 +2383,6 @@ R_API int r_core_config_init(RCore *core) {
SETCB ("anal.brokenrefs", "false", &cb_anal_brokenrefs, "Follow function references as well if function analysis was failed");
SETCB ("anal.refstr", "false", &cb_anal_searchstringrefs, "Search string references in data references");
SETCB ("anal.bb.align", "0x10", &cb_anal_bbs_alignment, "Possible space between basic blocks");
SETCB ("anal.bb.maxsize", "1024", &cb_anal_bb_max_size, "Maximum basic block size");
SETCB ("anal.pushret", "false", &cb_anal_pushret, "Analyze push+ret as jmp");

View File

@ -597,7 +597,6 @@ typedef struct r_anal_options_t {
int followdatarefs;
int searchstringrefs;
int followbrokenfcnsrefs;
int bbs_alignment;
int bb_max_size;
int afterjmp; // continue analysis after jmp eax or forward jmp // option
int recont; // continue on recurse analysis mode