Fix visual debug view

Regression from 16e722cffc:
Visual debug (Vpp) was empty because of broken commands.
This commit is contained in:
Florian Märkl 2023-05-06 19:02:31 +02:00 committed by Anton Kochkov
parent 344b460f6e
commit cdaaf1a273
2 changed files with 6 additions and 6 deletions

View file

@ -7,8 +7,8 @@
#define NPF 5
#define PIDX (RZ_ABS(((RzCoreVisual *)core->visual)->printidx % NPF))
#define CMD_REGISTERS "?== true `e cfg.debug`; ?! dr=; ?? ar=" // select dr= or ar= depending on cfg.debug
#define CMD_REGISTERS_REFS "?== true `e cfg.debug`; ?! drr; ?? arr" // select drr or arr depending on cfg.debug
#define CMD_REGISTERS "%== true `e cfg.debug`; %! dr=; %% ar=" // select dr= or ar= depending on cfg.debug
#define CMD_REGISTERS_REFS "%== true `e cfg.debug`; %! drr; %% arr" // select drr or arr depending on cfg.debug
extern const char *printfmtSingle[NPF];
extern const char *printfmtColumns[NPF];

View file

@ -3716,7 +3716,7 @@ RZ_IPI int rz_core_visual(RzCore *core, const char *input) {
if (cmdvhex && *cmdvhex) {
rz_strf(debugstr,
"?0 ; f+ tmp ; sr %s @e: cfg.seek.silent=true ; %s ; ?1 ; %s ; ?1 ; "
"%%0 ; f+ tmp ; sr %s @e: cfg.seek.silent=true ; %s ; %%1 ; %s ; %%1 ; "
"s tmp @e: cfg.seek.silent=true ; f- tmp ; pd $r",
reg, cmdvhex,
ref ? CMD_REGISTERS_REFS : CMD_REGISTERS);
@ -3726,9 +3726,9 @@ RZ_IPI int rz_core_visual(RzCore *core, const char *input) {
const char sign = (delta < 0) ? '+' : '-';
const int absdelta = RZ_ABS(delta);
rz_strf(debugstr,
"diq ; ?0 ; f+ tmp ; sr %s @e: cfg.seek.silent=true ; %s %d @ $$%c%d;"
"?1 ; %s;"
"?1 ; s tmp @e: cfg.seek.silent=true ; f- tmp ; afal ; pd $r",
"diq ; %%0 ; f+ tmp ; sr %s @e: cfg.seek.silent=true ; %s %d @ $$%c%d;"
"%%1 ; %s;"
"%%1 ; s tmp @e: cfg.seek.silent=true ; f- tmp ; afal ; pd $r",
reg, pxa ? "pxa" : pxw, size, sign, absdelta,
ref ? CMD_REGISTERS_REFS : CMD_REGISTERS);
}