Skip to content

Commit

Permalink
pdua now takes a math arg, not just a number ##shell
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Nov 17, 2023
1 parent 4c74e9e commit aa0b3e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libr/core/cmd_print.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ R_API void r_core_set_asm_configs(RCore *core, char *arch, ut32 bits, int segoff
static int cmd_pdu(RCore *core, const char *input) {
int ret = 0;
const char *sep = strchr (input, ' ');
const char *arg = sep? sep+1: NULL;
const char *arg = sep? r_str_trim_head_ro (sep): NULL;

ut64 addr = core->offset;
int len = core->blocksize;
Expand All @@ -1157,7 +1157,7 @@ static int cmd_pdu(RCore *core, const char *input) {
r_core_cmd_help_match (core, help_msg_pdu, "pdua");
break;
}
ut64 to = r_num_get (core->num, arg);
ut64 to = r_num_math (core->num, arg);
if (!to) {
R_LOG_ERROR ("Couldn't parse address \"%s\"", arg);
ret = 1;
Expand All @@ -1182,19 +1182,19 @@ static int cmd_pdu(RCore *core, const char *input) {
r_core_cmd_help_match (core, help_msg_pdu, "pduc");
break;
}

ret = r_core_print_disasm (core, addr, buf, len, 0, pdu_opcode, "call", false,
input[1] == 'j', NULL, NULL);
break;
/*case 'e': // "pdue"
#if 0
case 'e': // "pdue"
if (input[1] == '?' || input[2] == '?' || !arg) {
r_core_cmd_help_match (core, help_msg_pdu, "pdue");
break;
}
ret = r_core_print_disasm (core, addr, buf, len, 0, esil, arg, false,
input[1] == 'j', NULL, NULL);
break;*/
break;
#endif
case 'i': // "pdui"
if (input[1] == '?' || (input[1] && input[2] == '?') || !arg) {
r_core_cmd_help_match (core, help_msg_pdu, "pdui");
Expand Down

0 comments on commit aa0b3e8

Please sign in to comment.