mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-09 01:21:05 +00:00
Added local labels reference display
This commit is contained in:
parent
ad882d1ba3
commit
c39e6aee82
@ -846,13 +846,40 @@ toro:
|
||||
case R_ANAL_OP_TYPE_JMP:
|
||||
case R_ANAL_OP_TYPE_CJMP:
|
||||
case R_ANAL_OP_TYPE_CALL:
|
||||
{
|
||||
f = r_anal_fcn_find (core->anal,
|
||||
analop.jump, R_ANAL_FCN_TYPE_NULL);
|
||||
RAnalFunction *cf = r_anal_fcn_find (core->anal, /* current function */
|
||||
at, R_ANAL_FCN_TYPE_NULL);
|
||||
if (f && !strstr (opstr, f->name)) {
|
||||
if (f->locals != NULL) {
|
||||
RAnalFcnLocal *l;
|
||||
RListIter *iter;
|
||||
r_list_foreach (f->locals, iter, l) {
|
||||
if (analop.jump == l->addr) {
|
||||
if ((cf != NULL) && (f == cf)) {
|
||||
r_cons_strcat (color_label);
|
||||
r_cons_printf (" ; (%s)", l->name);
|
||||
r_cons_strcat (Color_RESET);
|
||||
break;
|
||||
} else {
|
||||
r_cons_strcat (color_fname);
|
||||
r_cons_printf ("; (%s", f->name);
|
||||
r_cons_strcat (Color_RESET);
|
||||
r_cons_strcat (color_label);
|
||||
r_cons_printf (".%s)", l->name);
|
||||
r_cons_strcat (Color_RESET);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
r_cons_strcat (color_fname);
|
||||
r_cons_printf (" ; (%s)", f->name);
|
||||
r_cons_strcat (Color_RESET);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user