From 8e59afb91c4adb6347ec63c991889d97eafcf021 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 2 Jan 2017 15:56:08 +0100 Subject: [PATCH] Update acr and fix some tiny covs --- configure | 8 ++++---- libr/bin/p/bin_dex.c | 10 +++------- libr/core/disasm.c | 4 +++- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 5b04cd345f..9dc277528e 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# This script was automatically generated by ACR v0.10.2 +# This script was automatically generated by ACR v1.0 # @author: pancake # @url: http://www.nopcode.org # @repo: git clone https://github.com/radare/acr @@ -104,8 +104,8 @@ create_environ() { : ${MANDIR:="${DATADIR}/man"} : ${LOCALSTATEDIR:="${SPREFIX}/var"} for A in `echo ${PATH} | sed -e 's,:, ,g'` ; do - [ -e $A/ginstall ] && : ${INSTALL:=$A/ginstall} && break - [ -e $A/install ] && : ${INSTALL:=$A/install} && break + [ -e "$A"/ginstall ] && : ${INSTALL:="$A"/ginstall} && break + [ -e "$A"/install ] && : ${INSTALL:="$A"/install} && break done : ${INSTALL_DIR:=${INSTALL} -d} : ${INSTALL_DATA:=${INSTALL} -m 644} @@ -200,7 +200,7 @@ take_environ() { } show_version() { -echo "radare2-1.2.0-git configuration script done with acr v0.10.2. +echo "radare2-1.2.0-git configuration script done with acr v1.0. The 'Free Software Foundation' message is only for autodetection. Originally written by pancake ." exit 0 diff --git a/libr/bin/p/bin_dex.c b/libr/bin/p/bin_dex.c index 8ffce4e204..c9a4239435 100644 --- a/libr/bin/p/bin_dex.c +++ b/libr/bin/p/bin_dex.c @@ -1,4 +1,5 @@ /* radare - LGPL - Copyright 2011-2016 - pancake */ + #include #include #include @@ -17,7 +18,6 @@ #endif static bool dexdump = false; - static Sdb *mdb = NULL; static Sdb *cdb = NULL; // TODO: remove if it is not used @@ -1132,7 +1132,6 @@ static const ut8 *parse_dex_class_method(RBinFile *binfile, RBinDexObj *bin, } } } - if (catchAll) { p3 = r_uleb128 (p3, p3_end - p3, &v2); if (dexdump) { @@ -1144,7 +1143,6 @@ static const ut8 *parse_dex_class_method(RBinFile *binfile, RBinDexObj *bin, } } } - } else { if (dexdump) { rbin->cb_printf ( @@ -1159,10 +1157,8 @@ static const ut8 *parse_dex_class_method(RBinFile *binfile, RBinDexObj *bin, } } - if (MC > 0 && debug_info_off > 0 && - bin->header.data_offset < debug_info_off && - debug_info_off < - bin->header.data_offset + bin->header.data_size) { + if (MC > 0 && debug_info_off > 0 && bin->header.data_offset < debug_info_off && + debug_info_off < bin->header.data_offset + bin->header.data_size) { dex_parse_debug_item (binfile, bin, c, MI, MA, ins_size, insns_size, cls->name, regsz, debug_info_off); } else if (MC > 0) { diff --git a/libr/core/disasm.c b/libr/core/disasm.c index 33795792b5..ab72aab7eb 100644 --- a/libr/core/disasm.c +++ b/libr/core/disasm.c @@ -2734,9 +2734,11 @@ static void ds_print_ptr(RDisasmState *ds, int len, int idx) { } else { ds_print_as_string (ds); } +#if DEADCODE if (aligned && ds->show_color) { r_cons_printf (Color_RESET); } +#endif } // TODO: Use sdb in rbin to accelerate this @@ -3195,9 +3197,9 @@ callfallback: } break; } +beach: r_config_restore (hc); r_config_hold_free (hc); -beach: if (ds->show_spacy) { switch (ds->analop.type) { case R_ANAL_OP_TYPE_CALL: