Fix #10269 - rad is not json

This commit is contained in:
pancake 2018-06-06 12:21:29 +02:00 committed by radare
parent 93a1059137
commit 4e57af4521
3 changed files with 21 additions and 13 deletions

View File

@ -2060,14 +2060,14 @@ RAMPX, RAMPY, RAMPZ, RAMPD and EIND:
"gpr r31 .8 31 0\n"
// 16 bit overlapped registers for 16 bit math
"gpr r17:r16 .16 16 0\n"
"gpr r19:r18 .16 18 0\n"
"gpr r21:r20 .16 20 0\n"
"gpr r23:r22 .16 22 0\n"
"gpr r25:r24 .16 24 0\n"
"gpr r27:r26 .16 26 0\n"
"gpr r29:r28 .16 28 0\n"
"gpr r31:r30 .16 30 0\n"
"gpr r17_r16 .16 16 0\n"
"gpr r19_r18 .16 18 0\n"
"gpr r21_r20 .16 20 0\n"
"gpr r23_r22 .16 22 0\n"
"gpr r25_r24 .16 24 0\n"
"gpr r27_r26 .16 26 0\n"
"gpr r29_r28 .16 28 0\n"
"gpr r31_r30 .16 30 0\n"
// 16 bit overlapped registers for memory addressing
"gpr x .16 26 0\n"

View File

@ -2775,15 +2775,23 @@ static void __anal_reg_list(RCore *core, int type, int bits, char mode) {
/* workaround for 6502 */
if (!strcmp (core->anal->cur->arch, "6502") && bits == 8) {
mode2 = mode == 'j' ? 'J' : mode;
r_cons_printf ("{");
if (mode == 'j') {
r_cons_printf ("{");
}
r_debug_reg_list (core->dbg, R_REG_TYPE_GPR, 16, mode2, use_color); // XXX detect which one is current usage
r_cons_printf (",");
if (mode == 'j') {
r_cons_printf (",");
}
}
if (!strcmp (core->anal->cur->arch, "avr") && bits == 8) {
mode2 = mode == 'j' ? 'J' : mode;
r_cons_printf ("{");
if (mode == 'j') {
r_cons_printf ("{");
}
r_debug_reg_list (core->dbg, R_REG_TYPE_GPR, 16, mode2, use_color); // XXX detect which one is current usage
r_cons_printf (",");
if (mode == 'j') {
r_cons_printf (",");
}
}
}
}

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2009-2017 - pancake */
/* radare - LGPL - Copyright 2009-2018 - pancake */
#include <r_core.h> // just to get the RPrint instance
#include <r_debug.h>