mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-25 08:43:16 +00:00
Another fix for xrefs
This commit is contained in:
parent
8b7d4b033c
commit
1c7b576f1b
@ -58,6 +58,10 @@ R_API int r_anal_xrefs_set (RAnal *anal, const RAnalRefType type,
|
|||||||
char key[32];
|
char key[32];
|
||||||
if (!anal || !DB)
|
if (!anal || !DB)
|
||||||
return R_FALSE;
|
return R_FALSE;
|
||||||
|
// unknown refs should not be stored. seems wrong
|
||||||
|
if (type == R_ANAL_REF_TYPE_NULL) {
|
||||||
|
return R_FALSE;
|
||||||
|
}
|
||||||
XREFKEY (key, sizeof (key), "ref", type, from);
|
XREFKEY (key, sizeof (key), "ref", type, from);
|
||||||
sdb_array_add_num (DB, key, to, 0);
|
sdb_array_add_num (DB, key, to, 0);
|
||||||
XREFKEY (key, sizeof (key), "xref", type, to);
|
XREFKEY (key, sizeof (key), "xref", type, to);
|
||||||
@ -105,7 +109,7 @@ R_API RList *r_anal_xrefs_get (RAnal *anal, ut64 to) {
|
|||||||
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_CALL, to);
|
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_CALL, to);
|
||||||
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_DATA, to);
|
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_DATA, to);
|
||||||
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_STRING, to);
|
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_STRING, to);
|
||||||
if (r_list_length (list)<1) {
|
if (r_list_empty (list)) {
|
||||||
r_list_free (list);
|
r_list_free (list);
|
||||||
list = NULL;
|
list = NULL;
|
||||||
}
|
}
|
||||||
|
@ -805,7 +805,7 @@ R_API int r_core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int dept
|
|||||||
r_list_append (fcn->xrefs, ref);
|
r_list_append (fcn->xrefs, ref);
|
||||||
#endif
|
#endif
|
||||||
// XXX this is creating dupped entries in the refs list with invalid reftypes, wtf?
|
// XXX this is creating dupped entries in the refs list with invalid reftypes, wtf?
|
||||||
//r_anal_xrefs_set (core->anal, reftype, from, at);
|
r_anal_xrefs_set (core->anal, reftype, from, at);
|
||||||
}
|
}
|
||||||
// XXX: this is wrong. See CID 1134565
|
// XXX: this is wrong. See CID 1134565
|
||||||
r_anal_fcn_insert (core->anal, fcn);
|
r_anal_fcn_insert (core->anal, fcn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user