mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 12:27:40 +00:00
Kill anal.bb.align variable ##refactor
This commit is contained in:
parent
3050203ac0
commit
2420cb53d2
@ -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;
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user