mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-02 19:55:14 +00:00
bbs_alignment
This commit is contained in:
parent
6dc0bd41c1
commit
c7fdb730ee
@ -786,7 +786,7 @@ R_API int r_anal_fcn(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut64
|
||||
// set function size as length of continuous sequence of bbs
|
||||
r_list_sort (fcn->bbs, &cmpaddr);
|
||||
r_list_foreach (fcn->bbs, iter, bb) {
|
||||
if (endaddr != bb->addr) break;
|
||||
if (endaddr < bb->addr - anal->opt.bbs_alignment) break;
|
||||
endaddr += bb->size;
|
||||
}
|
||||
r_anal_fcn_resize(fcn, endaddr - fcn->addr);
|
||||
|
@ -1290,6 +1290,13 @@ static int cb_anal_followbrokenfcnsrefs(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;
|
||||
}
|
||||
|
||||
#define SLURP_LIMIT (10*1024*1024)
|
||||
R_API int r_core_config_init(RCore *core) {
|
||||
int i;
|
||||
@ -1339,6 +1346,7 @@ R_API int r_core_config_init(RCore *core) {
|
||||
SETCB("anal.followbrokenfcnsrefs", "false", &cb_anal_followbrokenfcnsrefs, "Follow function references as well if function analysis was failed");
|
||||
|
||||
SETCB("anal.searchstringrefs", "false", &cb_anal_searchstringrefs, "Search string references in data references");
|
||||
SETCB("anal.bbs_alignment", "0x10", &cb_anal_bbs_alignment, "Possible space between basic blocks");
|
||||
|
||||
SETPREF("esil.prestep", "true", "Step before esil evaluation in `de` commands");
|
||||
SETCB("esil.debug", "false", &cb_esildebug, "Show ESIL debug info");
|
||||
|
@ -572,6 +572,7 @@ typedef struct r_anal_options_t {
|
||||
int followdatarefs;
|
||||
int searchstringrefs;
|
||||
int followbrokenfcnsrefs;
|
||||
int bbs_alignment;
|
||||
int afterjmp; // continue analysis after jmp eax or forward jmp // option
|
||||
int recont; // continue on recurse analysis mode
|
||||
int eobjmp; // option
|
||||
|
Loading…
x
Reference in New Issue
Block a user