mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-01 00:51:19 +00:00
Fix #7774 - Fix xrefs when saving/loading projects
This commit is contained in:
parent
e3ee2fca64
commit
59c5a49623
@ -2043,13 +2043,13 @@ static int fcn_print_detail(RCore *core, RAnalFunction *fcn) {
|
||||
r_list_foreach (fcn->refs, refiter, refi) {
|
||||
switch (refi->type) {
|
||||
case R_ANAL_REF_TYPE_CALL:
|
||||
r_cons_printf ("afxC 0x%"PFMT64x" 0x%"PFMT64x"\n", fcn->addr, refi->addr);
|
||||
r_cons_printf ("afxC 0x%"PFMT64x" 0x%"PFMT64x"\n", refi->at, refi->addr);
|
||||
break;
|
||||
case R_ANAL_REF_TYPE_DATA:
|
||||
r_cons_printf ("afxd 0x%"PFMT64x" 0x%"PFMT64x"\n", fcn->addr, refi->addr);
|
||||
r_cons_printf ("afxd 0x%"PFMT64x" 0x%"PFMT64x"\n", refi->at, refi->addr);
|
||||
break;
|
||||
case R_ANAL_REF_TYPE_CODE:
|
||||
r_cons_printf ("afxc 0x%"PFMT64x" 0x%"PFMT64x"\n", fcn->addr, refi->addr);
|
||||
r_cons_printf ("afxc 0x%"PFMT64x" 0x%"PFMT64x"\n", refi->at, refi->addr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2169,7 +2169,7 @@ static int cmd_anal_fcn(RCore *core, const char *input) {
|
||||
*p = 0;
|
||||
a = r_num_math (core->num, mi + 3);
|
||||
b = r_num_math (core->num, p + 1);
|
||||
fcn = r_anal_get_fcn_in (core->anal, a, R_ANAL_FCN_TYPE_ROOT);
|
||||
fcn = r_anal_get_fcn_in (core->anal, a, R_ANAL_FCN_TYPE_NULL);
|
||||
if (fcn) {
|
||||
r_anal_fcn_xref_add (core->anal, fcn, a, b, input[2]);
|
||||
} else eprintf ("Cannot add reference to non-function\n");
|
||||
|
Loading…
Reference in New Issue
Block a user