mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-23 22:36:27 +00:00
Moved init of core->anal->read_at into r_core_init()
This commit is contained in:
parent
bbb4fb263b
commit
c7e38939bd
@ -3098,10 +3098,6 @@ static ut64 initializeEsil(RCore *core) {
|
||||
return addr;
|
||||
}
|
||||
|
||||
static bool read_at(RAnal *anal, ut64 addr, ut8 *buf, int len) {
|
||||
return r_io_read_at (anal->iob.io, addr, buf, len);
|
||||
}
|
||||
|
||||
R_API int r_core_esil_step(RCore *core, ut64 until_addr, const char *until_expr, ut64 *prev_addr) {
|
||||
#define return_tail(x) { tail_return_value = x; goto tail_return; }
|
||||
int tail_return_value = 0;
|
||||
@ -3123,7 +3119,6 @@ R_API int r_core_esil_step(RCore *core, ut64 until_addr, const char *until_expr,
|
||||
return 0;
|
||||
}
|
||||
r_anal_esil_setup (esil, core->anal, romem, stats, noNULL); // setup io
|
||||
core->anal->read_at = read_at;
|
||||
core->anal->esil = esil;
|
||||
esil->verbose = verbose;
|
||||
{
|
||||
|
@ -1723,6 +1723,10 @@ static bool r_core_anal_log(struct r_anal_t *anal, const char *msg) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool r_core_anal_read_at(struct r_anal_t *anal, ut64 addr, ut8 *buf, int len) {
|
||||
return r_io_read_at (anal->iob.io, addr, buf, len);
|
||||
}
|
||||
|
||||
R_API bool r_core_init(RCore *core) {
|
||||
core->blocksize = R_CORE_BLOCKSIZE;
|
||||
core->block = (ut8*)calloc (R_CORE_BLOCKSIZE + 1, 1);
|
||||
@ -1816,6 +1820,7 @@ R_API bool r_core_init(RCore *core) {
|
||||
r_asm_set_user_ptr (core->assembler, core);
|
||||
core->anal = r_anal_new ();
|
||||
core->anal->log = r_core_anal_log;
|
||||
core->anal->read_at = r_core_anal_read_at;
|
||||
core->anal->meta_spaces.cb_printf = r_cons_printf;
|
||||
core->anal->cb.on_fcn_new = on_fcn_new;
|
||||
core->anal->cb.on_fcn_delete = on_fcn_delete;
|
||||
|
Loading…
x
Reference in New Issue
Block a user