mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 12:12:06 +00:00
Show function signature on tailcall jumps ##disasm
This commit is contained in:
parent
afae8b6e34
commit
0ba24ddd12
@ -1,4 +1,4 @@
|
||||
/* radare - LGPL - Copyright 2010-2018 - nibble, alvaro, pancake */
|
||||
/* radare - LGPL - Copyright 2010-2019 - nibble, alvaro, pancake */
|
||||
|
||||
#include <r_anal.h>
|
||||
#include <r_util.h>
|
||||
@ -848,26 +848,7 @@ R_API int r_anal_case(RAnal *anal, RAnalFunction *fcn, ut64 addr_bbsw, ut64 addr
|
||||
return idx;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int walk_switch(RAnal *anal, RAnalFunction *fcn, ut64 from, ut64 at) {
|
||||
ut8 buf[1024];
|
||||
int i;
|
||||
eprintf ("WALK SWITCH TABLE INTO (0x%"PFMT64x ") %"PFMT64x "\n", from, at);
|
||||
for (i = 0; i < 10; i++) {
|
||||
(void) anal->iob.read_at (anal->iob.io, at, buf, sizeof (buf));
|
||||
// TODO check for return value
|
||||
int sz = r_anal_case (anal, fcn, from, at, buf, sizeof (buf), 0);
|
||||
if (sz < 1) {
|
||||
break;
|
||||
}
|
||||
at += sz;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool purity_checked(HtUP *ht, RAnalFunction *fcn)
|
||||
{
|
||||
static bool purity_checked(HtUP *ht, RAnalFunction *fcn) {
|
||||
bool checked;
|
||||
ht_up_find (ht, fcn->addr, &checked);
|
||||
return checked;
|
||||
@ -1451,7 +1432,6 @@ repeat:
|
||||
case R_ANAL_OP_TYPE_IRJMP:
|
||||
// if the next instruction is a symbol
|
||||
if (anal->opt.ijmp && isSymbolNextInstruction (anal, &op)) {
|
||||
// do nothing
|
||||
gotoBeach (R_ANAL_RET_END);
|
||||
}
|
||||
// switch statement
|
||||
|
@ -4290,6 +4290,14 @@ static void ds_print_esil_anal(RDisasmState *ds) {
|
||||
case R_ANAL_OP_TYPE_CJMP:
|
||||
ds_comment_esil (ds, true, true, ds->esil_likely? "; likely" : "; unlikely");
|
||||
break;
|
||||
case R_ANAL_OP_TYPE_JMP:
|
||||
{
|
||||
ut64 addr = ds->analop.jump;
|
||||
if (!r_anal_get_fcn_at (ds->core->anal, addr, R_ANAL_FCN_TYPE_NULL)
|
||||
&& !r_flag_get_at (core->flags, addr, false)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
case R_ANAL_OP_TYPE_UCALL:
|
||||
case R_ANAL_OP_TYPE_ICALL:
|
||||
case R_ANAL_OP_TYPE_RCALL:
|
||||
|
Loading…
x
Reference in New Issue
Block a user