mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-01 10:38:51 +00:00
Fix some big endian print issues
This commit is contained in:
parent
9fa79fbf0c
commit
0af7751bd8
@ -1825,6 +1825,7 @@ static int cmd_print(void *data, const char *input) {
|
||||
case 'W':
|
||||
for (i=0; i<len; i+=4) {
|
||||
ut32 *p = (ut32*)((ut8*)core->block+i);
|
||||
r_mem_copyendian((ut8*)p, (ut8*)p, 4, !core->print->big_endian);
|
||||
r_cons_printf ("0x%08"PFMT64x" 0x%08x\n", core->offset+i, *p);
|
||||
}
|
||||
break;
|
||||
|
@ -1142,18 +1142,21 @@ static int handle_print_meta_infos (RCore * core, RDisasmState *ds, ut8* buf, in
|
||||
case 2:
|
||||
{
|
||||
ut16 *data = (ut16*)(buf+idx);
|
||||
r_mem_copyendian((ut8*)data, (ut8*)data, 2, !core->print->big_endian);
|
||||
r_cons_printf (".word 0x%04x\n", *data);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
ut32 *data = (ut32*)(buf+idx);
|
||||
r_mem_copyendian((ut8*)data, (ut8*)data, 4, !core->print->big_endian);
|
||||
r_cons_printf (".dword 0x%08x\n", *data);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
ut64 *data = (ut64*)(buf+idx);
|
||||
r_mem_copyendian((ut8*)data, (ut8*)data, 8, !core->print->big_endian);
|
||||
r_cons_printf (".qword 0x%016x\n", *data);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user