mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-24 23:06:36 +00:00
Enhancements for the p=ej
This commit is contained in:
parent
e1c120e654
commit
f641200bdc
@ -1733,11 +1733,13 @@ static void cmd_print_bars(RCore *core, const char *input) {
|
||||
int i;
|
||||
switch (submode) {
|
||||
case 'j':
|
||||
r_cons_printf ("{\"blocksize\":%d,\"entropy\":[", blocksize);
|
||||
r_cons_printf ("{\"blocksize\":%d,\"address\":%"PFMT64d",\"size\":%"PFMT64d",\"entropy\":[",
|
||||
blocksize, core->offset, totalsize);
|
||||
for (i = 0; i < nblocks; i++) {
|
||||
ut8 ep = ptr[i];
|
||||
ut64 off = blocksize * i;
|
||||
const char *comma = (i+1< (nblocks))?",": "";
|
||||
off += core->offset;
|
||||
r_cons_printf ("{\"addr\":%"PFMT64d",\"value\":%d}%s",
|
||||
off, ep, comma);
|
||||
|
||||
|
@ -315,7 +315,7 @@ static ut64 num_callback(RNum *userptr, const char *str, int *ok) {
|
||||
if (!s->vaddr && s->offset) continue;
|
||||
if (s->vaddr < lower) lower = s->vaddr;
|
||||
}
|
||||
return lower;
|
||||
return (lower == UT64_MAX)? 0LL: lower;
|
||||
}
|
||||
break;
|
||||
case 'v': return op.val; // immediate value
|
||||
|
Loading…
x
Reference in New Issue
Block a user