mirror of
https://github.com/radareorg/radare2.git
synced 2024-10-07 02:23:58 +00:00
Add ax-*
, fix ax-
and doc for axf
(reported by @dweinstein)
This commit is contained in:
parent
3ef6f65a13
commit
db5e4b0997
@ -54,6 +54,7 @@ This release comes with contributions from the following people:
|
||||
- Anton Devil
|
||||
- Asger Hautop Drewsen
|
||||
- Clement Vuchener
|
||||
- David Weinstein
|
||||
- Elias Boutaleb
|
||||
- Gabriel Corona
|
||||
- James Sullivan1
|
||||
|
@ -35,12 +35,12 @@ R_API int r_anal_ref_add(RAnal *anal, ut64 addr, ut64 at, int type) {
|
||||
return R_TRUE;
|
||||
}
|
||||
|
||||
R_API int r_anal_ref_del(RAnal *anal, ut64 at, ut64 addr) {
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_NULL, at, addr);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_CODE, at, addr);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_CALL, at, addr);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_DATA, at, addr);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_STRING, at, addr);
|
||||
R_API int r_anal_ref_del(RAnal *anal, ut64 from, ut64 to) {
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_NULL, from, to);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_CODE, from, to);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_CALL, from, to);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_DATA, from, to);
|
||||
r_anal_xrefs_deln (anal, R_ANAL_REF_TYPE_STRING, from, to);
|
||||
return R_TRUE;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@ static void var_help(RCore *core, char ch) {
|
||||
"afv-", " [idx]", "delete variable at the given index",
|
||||
"afvg", " [idx] [addr]", "define var get reference",
|
||||
"afvs", " [idx] [addr]", "define var set reference",
|
||||
"afx", "[-] [from] [to]", "manipulate function xrefs",
|
||||
NULL};
|
||||
if (ch=='a' || ch=='A' || ch=='v') {
|
||||
r_core_cmd_help (core, help_msg);
|
||||
@ -1964,7 +1965,27 @@ static boolt cmd_anal_refs(RCore *core, const char *input) {
|
||||
NULL };
|
||||
switch (input[0]) {
|
||||
case '-':
|
||||
r_anal_ref_del (core->anal, r_num_math (core->num, input+1), core->offset);
|
||||
{ // "ax-"
|
||||
const char *inp;
|
||||
ut64 a, b;
|
||||
for (inp=input+1;*inp && IS_WHITESPACE(*inp); inp++);
|
||||
if (!strcmp (inp, "*")) {
|
||||
r_anal_xrefs_init (core->anal);
|
||||
} else {
|
||||
char *p = strdup (inp);
|
||||
char *q = strchr (p, ' ');
|
||||
a = r_num_math (core->num, p);
|
||||
if (q) {
|
||||
*q++ = 0;
|
||||
b = r_num_math (core->num, q);
|
||||
} else {
|
||||
b = UT64_MAX;
|
||||
b = core->offset;
|
||||
}
|
||||
r_anal_ref_del (core->anal, b, a);
|
||||
free (p);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'k':
|
||||
if (input[1]==' ') {
|
||||
|
Loading…
Reference in New Issue
Block a user