From 2efc45024882c6f660522f09ee0ca61e7ded0245 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 17 Jun 2015 01:23:16 +0200 Subject: [PATCH] Fixes for `pxr` flags at zero and 32bit words in thumb --- libr/core/cmd_print.c | 6 +++++- libr/core/core.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libr/core/cmd_print.c b/libr/core/cmd_print.c index d22c8309ce..c4a1489c8e 100644 --- a/libr/core/cmd_print.c +++ b/libr/core/cmd_print.c @@ -2592,10 +2592,14 @@ static int cmd_print(void *data, const char *input) { r_cons_printf ("]\n"); } else { const int ocols = core->print->cols; + int bitsize = core->assembler->bits; + /* Thumb is 16bit arm but handles 32bit data */ + if (bitsize == 16) + bitsize = 32; core->print->cols = 1; core->print->flags |= R_PRINT_FLAGS_REFS; r_print_hexdump (core->print, core->offset, core->block, len, - core->assembler->bits, core->assembler->bits/8); + bitsize, bitsize/8); core->print->flags &= ~R_PRINT_FLAGS_REFS; core->print->cols = ocols; } diff --git a/libr/core/core.c b/libr/core/core.c index bf28793531..f54cecfbd8 100644 --- a/libr/core/core.c +++ b/libr/core/core.c @@ -714,7 +714,7 @@ R_API char *r_core_anal_hasrefs(RCore *core, ut64 value) { type = r_core_anal_address (core, value); fcn = r_anal_get_fcn_in (core->anal, value, 0); - if (value && fi) { + if (fi) { r_strbuf_appendf (s, " %s", fi->name); } if (fcn) {