remove PICK/RPICK from esil

This commit is contained in:
condret 2019-04-23 12:45:54 +00:00
parent f9de740685
commit 536e84ba28
2 changed files with 0 additions and 47 deletions

View File

@ -2552,49 +2552,6 @@ static int esil_swap(RAnalEsil *esil) {
return true;
}
static int __esil_generic_pick(RAnalEsil *esil, int rev) {
char *idx = r_anal_esil_pop (esil);
ut64 i;
int ret = false;
if (!idx || !r_anal_esil_get_parm (esil, idx, &i)) {
ERR ("esil_pick: invalid index number");
goto end;
}
if (!esil || !esil->stack) {
ERR ("esil_pick: stack not initialized");
goto end;
}
if (rev) {
i = esil->stackptr + (((st64) i) * -1);
}
if (esil->stackptr < i) {
ERR ("esil_pick: index out of stack bounds");
goto end;
}
if (!esil->stack[esil->stackptr-i]) {
ERR ("esil_pick: undefined element");
goto end;
}
if (!r_anal_esil_push (esil, esil->stack[esil->stackptr-i])) {
ERR ("ESIL stack is full");
esil->trap = 1;
esil->trap_code = 1;
goto end;
}
ret = true;
end:
free (idx);
return ret;
}
static int esil_pick(RAnalEsil *esil) {
return __esil_generic_pick (esil, 0);
}
static int esil_rpick(RAnalEsil *esil) {
return __esil_generic_pick (esil, 1);
}
// NOTE on following comparison functions:
// The push to top of the stack is based on a
// signed compare (as this causes least surprise to the users).
@ -3202,8 +3159,6 @@ static void r_anal_esil_setup_ops(RAnalEsil *esil) {
OP ("CLEAR", esil_clear);
OP ("DUP", esil_dup);
OP ("NUM", esil_num);
OP ("PICK", esil_pick);
OP ("RPICK", esil_rpick);
OP ("SWAP", esil_swap);
OP ("TRAP", esil_trap);
OP ("BITS", esil_bits);

View File

@ -200,8 +200,6 @@ static const char *help_detail_ae[] = {
"POP", "", "drops last element in the esil stack",
"DUP", "", "duplicate last value in stack",
"NUM", "", "evaluate last item in stack to number",
"PICK", "", "pick Nth element in stack",
"RPICK", "", "pick Nth element in reversed stack",
"SWAP", "", "swap last two values in stack",
"TRAP", "", "stop execution",
"BITS", "", "16,BITS # change bits, useful for arm/thumb",