diff --git a/libr/bin/bfile.c b/libr/bin/bfile.c index af35c17af4..75b0bbbf0a 100644 --- a/libr/bin/bfile.c +++ b/libr/bin/bfile.c @@ -1053,7 +1053,7 @@ R_API RList *r_bin_file_set_hashes(RBin *bin, RList/*methods = r_list_newf (r_bin_symbol_free); c->fields = r_list_newf (r_bin_field_free); - c->attr = attr; + c->visibility = visibility; } return c; } @@ -1081,7 +1081,7 @@ R_API void r_bin_class_free(RBinClass *k) { } } -R_API RBinClass *r_bin_file_add_class(RBinFile *bf, const char *name, const char *super, ut64 attr) { +R_API RBinClass *r_bin_file_add_class(RBinFile *bf, const char *name, const char *super, int view) { r_return_val_if_fail (name && bf && bf->bo, NULL); RBinClass *c = __getClass (bf, name); if (c) { @@ -1092,7 +1092,7 @@ R_API RBinClass *r_bin_file_add_class(RBinFile *bf, const char *name, const char } return c; } - c = r_bin_class_new (name, super, attr); + c = r_bin_class_new (name, super, view); if (c) { // XXX. no need for a list, the ht is iterable too c->index = r_list_length (bf->bo->classes); diff --git a/libr/bin/bin.c b/libr/bin/bin.c index d6cad11a9c..75b1875df0 100644 --- a/libr/bin/bin.c +++ b/libr/bin/bin.c @@ -1384,12 +1384,12 @@ R_API RBinField *r_bin_field_new(ut64 paddr, ut64 vaddr, int size, const char *n RBinField *ptr = R_NEW0 (RBinField); if (ptr) { ptr->name = strdup (name); - ptr->comment = R_STR_ISNOTEMPTY (comment)? strdup (comment): NULL; - ptr->format = R_STR_ISNOTEMPTY (format)? strdup (format): NULL; + ptr->comment = (comment && *comment)? strdup (comment): NULL; + ptr->format = (format && *format)? strdup (format): NULL; ptr->format_named = format_named; ptr->paddr = paddr; ptr->size = size; - // ptr->attr = default attributes for fields? + // ptr->visibility = any default visibility? ptr->vaddr = vaddr; } return ptr; @@ -1406,6 +1406,59 @@ R_API void r_bin_field_free(void *_field) { } } +// method name too long +// RBin.methFlagToString(RBin.Method.CLASS) +R_API const char *r_bin_get_meth_flag_string(ut64 flag, bool compact) { + switch (flag) { + case R_BIN_METH_CLASS: + return compact ? "c" : "class"; + case R_BIN_METH_STATIC: + return compact ? "s" : "static"; + case R_BIN_METH_PUBLIC: + return compact ? "p" : "public"; + case R_BIN_METH_PRIVATE: + return compact ? "P" : "private"; + case R_BIN_METH_PROTECTED: + return compact ? "r" : "protected"; + case R_BIN_METH_INTERNAL: + return compact ? "i" : "internal"; + case R_BIN_METH_OPEN: + return compact ? "o" : "open"; + case R_BIN_METH_FILEPRIVATE: + return compact ? "e" : "fileprivate"; + case R_BIN_METH_FINAL: + return compact ? "f" : "final"; + case R_BIN_METH_VIRTUAL: + return compact ? "v" : "virtual"; + case R_BIN_METH_CONST: + return compact ? "k" : "const"; + case R_BIN_METH_MUTATING: + return compact ? "m" : "mutating"; + case R_BIN_METH_ABSTRACT: + return compact ? "a" : "abstract"; + case R_BIN_METH_SYNCHRONIZED: + return compact ? "y" : "synchronized"; + case R_BIN_METH_NATIVE: + return compact ? "n" : "native"; + case R_BIN_METH_BRIDGE: + return compact ? "b" : "bridge"; + case R_BIN_METH_VARARGS: + return compact ? "g" : "varargs"; + case R_BIN_METH_SYNTHETIC: + return compact ? "h" : "synthetic"; + case R_BIN_METH_STRICT: + return compact ? "t" : "strict"; + case R_BIN_METH_MIRANDA: + return compact ? "A" : "miranda"; + case R_BIN_METH_CONSTRUCTOR: + return compact ? "C" : "constructor"; + case R_BIN_METH_DECLARED_SYNCHRONIZED: + return compact ? "Y" : "declared_synchronized"; + default: + return NULL; + } +} + R_IPI RBinSection *r_bin_section_new(const char *name) { RBinSection *s = R_NEW0 (RBinSection); if (s) { @@ -1532,116 +1585,9 @@ R_API void r_bin_name_free(RBinName *bn) { } } -static const char *attr_bit_name(ut64 n, bool compact) { - switch (n) { - case R_BIN_ATTR_HIDDEN: - return compact? "": "hidden"; - case R_BIN_ATTR_FRIENDLY: - return compact? "": "friendly"; - case R_BIN_ATTR_SEALED: - return compact? "": "sealed"; - case R_BIN_ATTR_GLOBAL: - return compact? "": "global"; - case R_BIN_ATTR_UNSAFE: - return compact? "": "unsafe"; - case R_BIN_ATTR_EXTERN: - return compact? "": "extern"; - case R_BIN_ATTR_READONLY: - return compact? "": "readonly"; - case R_BIN_ATTR_INTERFACE: - return compact? "": "interface"; - case R_BIN_ATTR_SYMBOLIC: - return compact? "": "symbolic"; - case R_BIN_ATTR_VERIFIED: - return compact? "": "verified"; - case R_BIN_ATTR_GETTER: - return compact? "": "getter"; - case R_BIN_ATTR_SETTER: - return compact? "": "setter"; - case R_BIN_ATTR_OPTIMIZED: - return compact? "": "optimized"; -#if 0 - case R_BIN_ATTR_ANNOTATED: - return compact? "": "anno"; -#endif - case R_BIN_ATTR_ASYNC: - return compact? "": "async"; - case R_BIN_ATTR_VOLATILE: - return compact? "": "volatile"; - case R_BIN_ATTR_TRANSIENT: - return compact? "": "transient"; - case R_BIN_ATTR_ENUM: - return compact? "": "enum"; - case R_BIN_ATTR_RACIST: - return compact? "": "racist"; - case R_BIN_ATTR_SUPER: - return compact ? "S": "super"; - case R_BIN_ATTR_ANNOTATION: - return compact ? "A": "annotation"; - case R_BIN_ATTR_WEAK: - return compact ? "w": "weak"; - case R_BIN_ATTR_CLASS: - return compact ? "c" : "class"; - case R_BIN_ATTR_STATIC: - return compact ? "s" : "static"; - case R_BIN_ATTR_PUBLIC: - return compact ? "p" : "public"; - case R_BIN_ATTR_PRIVATE: - return compact ? "P" : "private"; - case R_BIN_ATTR_PROTECTED: - return compact ? "r" : "protected"; - case R_BIN_ATTR_INTERNAL: - return compact ? "i" : "internal"; - case R_BIN_ATTR_OPEN: - return compact ? "o" : "open"; - case R_BIN_ATTR_FILEPRIVATE: - return compact ? "e" : "fileprivate"; - case R_BIN_ATTR_FINAL: - return compact ? "f" : "final"; - case R_BIN_ATTR_VIRTUAL: - return compact ? "v" : "virtual"; - case R_BIN_ATTR_CONST: - return compact ? "k" : "const"; - case R_BIN_ATTR_MUTATING: - return compact ? "m" : "mutating"; - case R_BIN_ATTR_ABSTRACT: - return compact ? "a" : "abstract"; - case R_BIN_ATTR_SYNCHRONIZED: - return compact ? "Y" : "synchronized"; - case R_BIN_ATTR_NATIVE: - return compact ? "n" : "native"; - case R_BIN_ATTR_BRIDGE: - return compact ? "b" : "bridge"; - case R_BIN_ATTR_VARARGS: - return compact ? "g" : "varargs"; - case R_BIN_ATTR_SYNTHETIC: - return compact ? "h" : "synthetic"; - case R_BIN_ATTR_STRICT: - return compact ? "t" : "strict"; - case R_BIN_ATTR_MIRANDA: - return compact ? "A" : "miranda"; - case R_BIN_ATTR_CONSTRUCTOR: - return compact ? "C" : "constructor"; - case R_BIN_ATTR_DECLARED_SYNCHRONIZED: - return compact ? "y" : "declared_synchronized"; - default: - return NULL; - } -} - -R_API char *r_bin_attr_tostring(ut64 attr, bool singlechar) { - int i; - RStrBuf *sb = r_strbuf_new (""); - for (i = 0; i < 64; i++) { - const ut64 bit = (1ULL << i); - if (attr & bit) { - if (!singlechar && !r_strbuf_is_empty (sb)) { - r_strbuf_append (sb, " "); - } - r_strbuf_append (sb, attr_bit_name (bit, singlechar)); - } - } - return r_strbuf_drain (sb); +// TODO : not implemented yet +R_API char *r_bin_attr_tostring(ut64 attr) { + return NULL; } // TODO : not implemented yet diff --git a/libr/bin/format/mach0/mach0.c b/libr/bin/format/mach0/mach0.c index af479caa60..65eedd942e 100644 --- a/libr/bin/format/mach0/mach0.c +++ b/libr/bin/format/mach0/mach0.c @@ -2940,7 +2940,7 @@ static void _enrich_symbol(RBinFile *bf, struct MACH0_(obj_t) *bin, HtPP *symcac } sym->forwarder = "NONE"; - sym->bind = sym->type && r_str_startswith (sym->type, "LOCAL")? R_BIN_BIND_LOCAL_STR: R_BIN_BIND_GLOBAL_STR; + sym->bind = sym->type && !strncmp (sym->type, "LOCAL", 5)? R_BIN_BIND_LOCAL_STR: R_BIN_BIND_GLOBAL_STR; sym->type = R_BIN_TYPE_FUNC_STR; if (bin->hdr.cputype == CPU_TYPE_ARM && wordsize < 64) { diff --git a/libr/bin/format/objc/mach0_classes.c b/libr/bin/format/objc/mach0_classes.c index 3174b11951..73f957c56c 100644 --- a/libr/bin/format/objc/mach0_classes.c +++ b/libr/bin/format/objc/mach0_classes.c @@ -771,8 +771,7 @@ static void get_method_list(mach0_ut p, RBinFile *bf, char *class_name, RBinClas } method->type = is_static? R_BIN_TYPE_FUNC_STR: R_BIN_TYPE_METH_STR; if (is_static) { - // it's a clas method, aka does not require an instance - method->attr |= R_BIN_ATTR_CLASS; + method->method_flags |= R_BIN_METH_CLASS; } if (is_thumb (bf)) { if (method->vaddr & 1) { diff --git a/libr/bin/mangling/objc.c b/libr/bin/mangling/objc.c index 18944eddca..74e7fb0d02 100644 --- a/libr/bin/mangling/objc.c +++ b/libr/bin/mangling/objc.c @@ -5,6 +5,7 @@ R_API char *r_bin_demangle_objc(RBinFile *bf, const char *sym) { r_return_val_if_fail ((!bf || (bf && bf->bo && bf->bo->classes)) && sym, NULL); + char *ret = NULL; char *clas = NULL; char *name = NULL; char *args = NULL; @@ -15,19 +16,19 @@ R_API char *r_bin_demangle_objc(RBinFile *bf, const char *sym) { bf = NULL; } /* classes */ - if (r_str_startswith (sym, "_OBJC_Class_")) { + if (!strncmp (sym, "_OBJC_Class_", 12)) { const char *className = sym + 12; - char *ret = r_str_newf ("class %s", className); + ret = r_str_newf ("class %s", className); if (bf) { - r_bin_file_add_class (bf, className, NULL, R_BIN_ATTR_PUBLIC); + r_bin_file_add_class (bf, className, NULL, R_BIN_CLASS_PUBLIC); } return ret; } - if (r_str_startswith (sym, "_OBJC_CLASS_$_")) { + if (!strncmp (sym, "_OBJC_CLASS_$_", 14)) { const char *className = sym + 14; - char *ret = r_str_newf ("class %s", className); + ret = r_str_newf ("class %s", className); if (bf) { - r_bin_file_add_class (bf, className, NULL, R_BIN_ATTR_PUBLIC); + r_bin_file_add_class (bf, className, NULL, R_BIN_CLASS_PUBLIC); } return ret; } @@ -107,7 +108,6 @@ R_API char *r_bin_demangle_objc(RBinFile *bf, const char *sym) { type = "static"; } } - char *ret = NULL; if (type) { if (!strcmp (type, "field")) { ret = r_str_newf ("field int %s::%s", clas, name); diff --git a/libr/bin/p/bin_dex.c b/libr/bin/p/bin_dex.c index eed861abd8..52780ee37c 100644 --- a/libr/bin/p/bin_dex.c +++ b/libr/bin/p/bin_dex.c @@ -9,52 +9,52 @@ extern struct r_bin_dbginfo_t r_bin_dbginfo_dex; -static ut64 get_method_attr(ut64 MA) { +static ut64 get_method_flags(ut64 MA) { ut64 flags = 0; if (MA & R_DEX_METH_PUBLIC) { - flags |= R_BIN_ATTR_PUBLIC; + flags |= R_BIN_METH_PUBLIC; } if (MA & R_DEX_METH_PRIVATE) { - flags |= R_BIN_ATTR_PRIVATE; + flags |= R_BIN_METH_PRIVATE; } if (MA & R_DEX_METH_PROTECTED) { - flags |= R_BIN_ATTR_PROTECTED; + flags |= R_BIN_METH_PROTECTED; } if (MA & R_DEX_METH_STATIC) { - flags |= R_BIN_ATTR_STATIC; + flags |= R_BIN_METH_STATIC; } if (MA & R_DEX_METH_FINAL) { - flags |= R_BIN_ATTR_FINAL; + flags |= R_BIN_METH_FINAL; } if (MA & R_DEX_METH_SYNCHRONIZED) { - flags |= R_BIN_ATTR_SYNCHRONIZED; + flags |= R_BIN_METH_SYNCHRONIZED; } if (MA & R_DEX_METH_BRIDGE) { - flags |= R_BIN_ATTR_BRIDGE; + flags |= R_BIN_METH_BRIDGE; } if (MA & R_DEX_METH_VARARGS) { - flags |= R_BIN_ATTR_VARARGS; + flags |= R_BIN_METH_VARARGS; } if (MA & R_DEX_METH_NATIVE) { - flags |= R_BIN_ATTR_NATIVE; + flags |= R_BIN_METH_NATIVE; } if (MA & R_DEX_METH_ABSTRACT) { - flags |= R_BIN_ATTR_ABSTRACT; + flags |= R_BIN_METH_ABSTRACT; } if (MA & R_DEX_METH_STRICT) { - flags |= R_BIN_ATTR_STRICT; + flags |= R_BIN_METH_STRICT; } if (MA & R_DEX_METH_SYNTHETIC) { - flags |= R_BIN_ATTR_SYNTHETIC; + flags |= R_BIN_METH_SYNTHETIC; } if (MA & R_DEX_METH_MIRANDA) { - flags |= R_BIN_ATTR_MIRANDA; + flags |= R_BIN_METH_MIRANDA; } if (MA & R_DEX_METH_CONSTRUCTOR) { - flags |= R_BIN_ATTR_CONSTRUCTOR; + flags |= R_BIN_METH_CONSTRUCTOR; } if (MA & R_DEX_METH_DECLARED_SYNCHRONIZED) { - flags |= R_BIN_ATTR_SYNCHRONIZED; + flags |= R_BIN_METH_DECLARED_SYNCHRONIZED; } return flags; } @@ -1091,7 +1091,7 @@ static void parse_dex_class_fields(RBinFile *bf, RBinDexClass *c, RBinClass *cls if (field) { field->vaddr = field->paddr = sym->paddr; field->name = strdup (sym->name); - field->attr = get_method_attr (accessFlags); + field->flags = get_method_flags (accessFlags); r_list_append (cls->fields, field); } lastIndex = fieldIndex; @@ -1354,7 +1354,7 @@ static void parse_dex_class_method(RBinFile *bf, RBinDexClass *c, RBinClass *cls dex->code_from = R_MIN (dex->code_from, sym->paddr); sym->lang = R_BIN_LANG_JAVA; sym->bind = ((MA & 1) == 1) ? R_BIN_BIND_GLOBAL_STR : R_BIN_BIND_LOCAL_STR; - sym->attr = get_method_attr (MA); + sym->method_flags = get_method_flags (MA); sym->ordinal = (*sym_count)++; if (MC > 0) { if (bufsz < MC || bufsz < MC + 16) { diff --git a/libr/bin/p/bin_java.c b/libr/bin/p/bin_java.c index 218f04629c..cbacd00bc8 100644 --- a/libr/bin/p/bin_java.c +++ b/libr/bin/p/bin_java.c @@ -1,4 +1,4 @@ -/* radare - LGPL - Copyright 2009-2023 - pancake, nibble, dso */ +/* radare - LGPL - Copyright 2009-2023 - pancake, nibble, Adam Pridgen */ #define R_LOG_ORIGIN "bin.java" diff --git a/libr/core/cbin.c b/libr/core/cbin.c index dc9240b7b3..19374b53c3 100644 --- a/libr/core/cbin.c +++ b/libr/core/cbin.c @@ -5,8 +5,8 @@ #define is_in_range(at, from, sz) ((at) >= (from) && (at) < ((from) + (sz))) -#define VA_FALSE 0 -#define VA_TRUE 1 +#define VA_FALSE 0 +#define VA_TRUE 1 #define VA_NOREBASE 2 #define LOAD_BSS_MALLOC 0 @@ -20,12 +20,15 @@ #define IS_MODE_NORMAL(mode) (!(mode)) #define IS_MODE_CLASSDUMP(mode) ((mode) & R_MODE_CLASSDUMP) +// dup from cmd_info +#define PAIR_WIDTH "9" + static R_TH_LOCAL int old_bits = -1; static R_TH_LOCAL char *old_arch = NULL; static void pair(const char *key, const char *val) { if (R_STR_ISNOTEMPTY (val)) { - r_cons_printf ("%-9s%s\n", key, val); + r_cons_printf ("%-"PAIR_WIDTH"s%s\n", key, val); } } @@ -714,13 +717,15 @@ R_API void r_core_anal_type_init(RCore *core) { } R_API void r_core_anal_cc_init(RCore *core) { - r_return_if_fail (core); char *anal_arch = strdup (r_config_get (core->config, "anal.arch")); const int bits = core->anal->config->bits; if (!anal_arch) { return; } - r_str_after (anal_arch, '.'); + char *dot = strchr (anal_arch, '.'); + if (dot) { + *dot = 0; + } if (old_bits != -1) { if (old_bits == bits) { if (!strcmp (old_arch, anal_arch)) { @@ -3723,6 +3728,7 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { RBinSymbol *sym; RBinClass *c; RBinField *f; + char *name; RList *cs = r_bin_get_classes (r->bin); if (!cs) { if (IS_MODE_JSON (mode)) { @@ -3745,10 +3751,10 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { } const bool bin_filter = r_config_get_b (r->config, "bin.filter"); r_list_foreach (cs, iter, c) { - if (!c || R_STR_ISEMPTY (c->name)) { + if (!c || !c->name || !c->name[0]) { continue; } - char *name = strdup (c->name); + name = strdup (c->name); r_name_filter (name, -1); ut64 at_min = UT64_MAX; ut64 at_max = 0LL; @@ -3772,11 +3778,8 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { r_strf_var (classname, 256, "class.%s", name); r_flag_set (r->flags, classname, c->addr, 1); r_list_foreach (c->methods, iter2, sym) { - // char *mflags = r_core_bin_attr_tostring (sym->attr, mode); - char *mflags = r_bin_attr_tostring (sym->attr, false); - r_str_replace_char (mflags, ' ', '.'); - // XXX probably access flags should not be part of the flag name - r_strf_var (method, 256, "method%s%s.%s.%s", R_STR_ISEMPTY (mflags)? "":".", mflags, c->name, sym->name); + char *mflags = r_core_bin_method_flags_str (sym->method_flags, mode); + r_strf_var (method, 256, "method%s.%s.%s", mflags, c->name, sym->name); R_FREE (mflags); r_name_filter (method, -1); r_flag_set (r->flags, method, sym->vaddr, 1); @@ -3848,17 +3851,13 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { } } r_list_foreach (c->methods, iter2, sym) { - char *mflags = r_bin_attr_tostring (sym->attr, false); - r_str_replace_char (mflags, ' ', '.'); + char *mflags = r_core_bin_method_flags_str (sym->method_flags, mode); char *n = c->name; // r_name_filter_shell (c->name); - char *sn = sym->name; //r_name_filter_shell (sym->name); // symbol contains classname - const char *predot = R_STR_ISNOTEMPTY (mflags)? ".": ""; - // char *cmd = r_str_newf ("\"f method%s.%s.%s = 0x%"PFMT64x"\"\n", mflags, n, sn, sym->vaddr); - char *cmd = r_str_newf ("\"f method.%s%s%s.%s = 0x%"PFMT64x"\"\n", n, predot, mflags, sn, sym->vaddr); + char *sn = sym->name; //r_name_filter_shell (sym->name); + char *cmd = r_str_newf ("\"f method%s.%s.%s = 0x%"PFMT64x"\"\n", mflags, n, sn, sym->vaddr); // free (n); // free (sn); if (cmd) { - // use namefilter thing to create the right flag r_str_replace_char (cmd, ' ', '_'); if (strlen (cmd) > 2) { cmd[2] = ' '; @@ -3919,18 +3918,7 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { pj_ka (pj, "super"); RBinName *bn; r_list_foreach (c->super, iter, bn) { -#if 0 - pj_o (pj); - if (bn->name) { - pj_ks (pj, "name", bn->name); - } - if (bn->oname) { - pj_ks (pj, "oname", bn->oname); - } - pj_end (pj); -#else pj_s (pj, r_bin_name_tostring (bn)); -#endif } pj_end (pj); } @@ -3952,8 +3940,8 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { } free (s); } - if (sym->attr) { - char *mflags = r_core_bin_attr_tostring (sym->attr, mode); + if (sym->method_flags) { + char *mflags = r_core_bin_method_flags_str (sym->method_flags, mode); pj_k (pj, "flags"); pj_j (pj, mflags); free (mflags); @@ -3972,9 +3960,9 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { if (R_STR_ISNOTEMPTY (f->type)) { pj_ks (pj, "type", f->type); } - if (f->attr) { - char *mflags = r_core_bin_attr_tostring (f->attr, mode); - pj_k (pj, "attr"); + if (f->flags) { + char *mflags = r_core_bin_method_flags_str (f->flags, mode); + pj_k (pj, "flags"); pj_j (pj, mflags); free (mflags); } @@ -4004,7 +3992,7 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { free (csv); } r_list_foreach (c->methods, iter2, sym) { - char *mflags = r_core_bin_attr_tostring (sym->attr, mode); + char *mflags = r_core_bin_method_flags_str (sym->method_flags, mode); const char *ls = r_bin_lang_tostring (sym->lang); r_cons_printf ("0x%08"PFMT64x" %s %8s %3d %s %s\n", sym->vaddr, ls? ls: "?", "method", m, mflags, sym->dname? sym->dname: sym->name); @@ -4014,12 +4002,11 @@ static bool bin_classes(RCore *r, PJ *pj, int mode) { m = 0; const char *ls = r_bin_lang_tostring (c->lang); r_list_foreach (c->fields, iter3, f) { - char *mflags = r_core_bin_attr_tostring (f->attr, mode); + char *mflags = r_core_bin_method_flags_str (f->flags, mode); const char *ks = r_bin_field_kindstr (f); r_cons_printf ("0x%08"PFMT64x" %s %8s %3d %s %s\n", f->vaddr, ls, ks, m, mflags, f->name); m++; - free (mflags); } } free (name); @@ -4623,7 +4610,6 @@ static bool bin_header(RCore *r, int mode) { } R_API bool r_core_bin_info(RCore *core, int action, PJ *pj, int mode, int va, RCoreBinFilter *filter, const char *chksum) { - r_return_val_if_fail (core, false); const char *name = (filter && filter->name)? filter->name : NULL; bool ret = true; ut64 at = UT64_MAX, loadaddr = r_bin_get_laddr (core->bin); @@ -4896,7 +4882,6 @@ static bool r_core_bin_file_print(RCore *core, RBinFile *bf, PJ *pj, int mode) { } R_API bool r_core_bin_list(RCore *core, int mode) { - r_return_val_if_fail (core, false); // list all binfiles and there objects and there archs RListIter *iter; RBinFile *binfile = NULL; @@ -4924,52 +4909,69 @@ R_API bool r_core_bin_list(RCore *core, int mode) { return true; } -R_API char *r_core_bin_attr_tostring(ut64 flags, int mode) { - RStrBuf *buf = r_strbuf_new (""); // rename to 'sb' +R_API char *r_core_bin_method_flags_str(ut64 flags, int mode) { + int i; + + RStrBuf *buf = r_strbuf_new (""); if (IS_MODE_SET (mode) || IS_MODE_RAD (mode)) { - if (flags) { - char *flag_string = r_bin_attr_tostring (flags, true); - if (flag_string) { - r_strbuf_append (buf, flag_string); + if (!flags) { + goto out; + } + for (i = 0; i < 64; i++) { + ut64 flag = flags & (1ULL << i); + if (flag) { + const char *flag_string = r_bin_get_meth_flag_string (flag, false); + if (flag_string) { + r_strbuf_appendf (buf, ".%s", flag_string); + } } - free (flag_string); } } else if (IS_MODE_JSON (mode)) { - if (flags) { - PJ *pj = pj_new (); - pj_a (pj); - char *flag_string = r_bin_attr_tostring (flags, false); - if (flag_string) { - pj_s (pj, flag_string); - } else { - // r_strf_var (numstr, 32, "0x%08"PFMT64x, flag); - pj_n (pj, flags); - } - pj_end (pj); - r_strbuf_append (buf, pj_string (pj)); - pj_free (pj); - free (flag_string); - } else { + if (!flags) { r_strbuf_append (buf, "[]"); + goto out; } + PJ *pj = pj_new (); + pj_a (pj); + for (i = 0; i < 64; i++) { + ut64 flag = flags & (1ULL << i); + if (flag) { + const char *flag_string = r_bin_get_meth_flag_string (flag, false); + if (flag_string) { + pj_s (pj, flag_string); + } else { + r_strf_var (numstr, 32, "0x%08"PFMT64x, flag); + pj_s (pj, numstr); + } + } + } + pj_end (pj); + r_strbuf_append (buf, pj_string (pj)); + pj_free (pj); } else { - int len = 4; - if (flags) { - // const char *flag_string = r_bin_get_meth_flag_string (flag, true); - char *flag_string = r_bin_attr_tostring (flags, true); - if (flag_string) { - r_strbuf_append (buf, flag_string); - } - len -= strlen (flag_string); - if (len < 1) { - len = 1; - } - free (flag_string); + int pad_len = 4; //TODO: move to a config variable + int len = 0; + if (!flags) { + goto padding; } - for ( ; len > 0; len--) { + for (i = 0; i < 64; i++) { + ut64 flag = flags & (1ULL << i); + if (flag) { + const char *flag_string = r_bin_get_meth_flag_string (flag, true); + if (flag_string) { + r_strbuf_append (buf, flag_string); + } else { + r_strbuf_append (buf, "?"); + } + len++; + } + } +padding: + for ( ; len < pad_len; len++) { r_strbuf_append (buf, " "); } } +out: return r_strbuf_drain (buf); } diff --git a/libr/core/cmd_info.inc.c b/libr/core/cmd_info.inc.c index 2c76d252c4..9b305d7486 100644 --- a/libr/core/cmd_info.inc.c +++ b/libr/core/cmd_info.inc.c @@ -112,11 +112,9 @@ static void classdump_keys(RCore *core, RBinObject *bo) { iova? f->vaddr: f->paddr); } r_list_foreach (k->methods, iter2, m) { - char *attr = r_bin_attr_tostring (m->attr, true); r_cons_printf ("klass.%s.method.%s.%s=0x%"PFMT64x"\n", - k->name, r_str_get (attr), m->name, + k->name, r_str_get (m->visibility_str), m->name, iova? m->vaddr: m->paddr); - free (attr); } } } @@ -1569,9 +1567,8 @@ static int cmd_info(void *data, const char *input) { r_list_foreach (cls->methods, iter2, sym) { pj_o (pj); pj_ks (pj, "name", sym->name); - if (sym->attr) { - // TODO: must be an array of strings - char *flags = r_core_bin_attr_tostring (sym->attr, false); + if (sym->method_flags) { + char *flags = r_core_bin_method_flags_str (sym->method_flags, R_MODE_JSON); pj_k (pj, "flags"); pj_j (pj, flags); free (flags); @@ -1585,11 +1582,11 @@ static int cmd_info(void *data, const char *input) { default: r_cons_printf ("class %s\n", cls->name); r_list_foreach (cls->methods, iter2, sym) { - char *flags = r_core_bin_attr_tostring (sym->attr, true); - r_cons_printf ("0x%08"PFMT64x " method %s %-4s %s\n", + char *flags = r_core_bin_method_flags_str (sym->method_flags, 0); + r_cons_printf ("0x%08"PFMT64x " method %s %s %s\n", iova? sym->vaddr: sym->paddr, cls->name, flags, sym->name); - free (flags); + R_FREE (flags); } break; } diff --git a/libr/core/vmenus.c b/libr/core/vmenus.c index 1bca02228f..f1fcb3ae29 100644 --- a/libr/core/vmenus.c +++ b/libr/core/vmenus.c @@ -1291,6 +1291,7 @@ static void *show_class(RCore *core, int mode, int *idx, RBinClass *_c, const ch r_cons_printf ("[hjkl_/cfM]> methods of %s\n\n", _c->name); r_list_foreach (_c->methods, iter, m) { const char *name = m->dname? m->dname: m->name; + char *mflags; if (grep) { if (!r_str_casestr (name, grep)) { i++; @@ -1306,7 +1307,8 @@ static void *show_class(RCore *core, int mode, int *idx, RBinClass *_c, const ch } } - char *mflags = r_core_bin_attr_tostring (m->attr, false); + mflags = r_core_bin_method_flags_str (m->method_flags, 0); + if (show_color) { if (r_str_startswith (name, _c->name)) { name += strlen (_c->name); diff --git a/libr/include/r_bin.h b/libr/include/r_bin.h index 9c6f393e90..9c02c93a9e 100644 --- a/libr/include/r_bin.h +++ b/libr/include/r_bin.h @@ -71,7 +71,34 @@ R_LIB_VERSION_HEADER (r_bin); #define R_BIN_REQ_TRYCATCH 0x100000000 #define R_BIN_REQ_SECTIONS_MAPPING 0x200000000 -// TODO integrate with R_BIN_ATTR +// R2_590 - deprecate +#define R_BIN_CLASS_PUBLIC 0x0000000000000004L + +/* RBinSymbol->method_flags : */ +// XXX unify with RBinAttribute instead! R2_590 +#define R_BIN_METH_CLASS 0x0000000000000001L +#define R_BIN_METH_STATIC 0x0000000000000002L +#define R_BIN_METH_PUBLIC 0x0000000000000004L +#define R_BIN_METH_PRIVATE 0x0000000000000008L +#define R_BIN_METH_PROTECTED 0x0000000000000010L +#define R_BIN_METH_INTERNAL 0x0000000000000020L +#define R_BIN_METH_OPEN 0x0000000000000040L +#define R_BIN_METH_FILEPRIVATE 0x0000000000000080L +#define R_BIN_METH_FINAL 0x0000000000000100L +#define R_BIN_METH_VIRTUAL 0x0000000000000200L +#define R_BIN_METH_CONST 0x0000000000000400L +#define R_BIN_METH_MUTATING 0x0000000000000800L +#define R_BIN_METH_ABSTRACT 0x0000000000001000L +#define R_BIN_METH_SYNCHRONIZED 0x0000000000002000L +#define R_BIN_METH_NATIVE 0x0000000000004000L +#define R_BIN_METH_BRIDGE 0x0000000000008000L +#define R_BIN_METH_VARARGS 0x0000000000010000L +#define R_BIN_METH_SYNTHETIC 0x0000000000020000L +#define R_BIN_METH_STRICT 0x0000000000040000L +#define R_BIN_METH_MIRANDA 0x0000000000080000L +#define R_BIN_METH_CONSTRUCTOR 0x0000000000100000L +#define R_BIN_METH_DECLARED_SYNCHRONIZED 0x0000000000200000L + #define R_BIN_BIND_LOCAL_STR "LOCAL" #define R_BIN_BIND_GLOBAL_STR "GLOBAL" #define R_BIN_BIND_WEAK_STR "WEAK" @@ -107,6 +134,8 @@ typedef enum { R_BIN_SYM_LAST } RBinSym; +// name mangling types +// TODO: Rename to R_BIN_LANG_ typedef enum { R_BIN_LANG_NONE = 0, R_BIN_LANG_JAVA = 1, @@ -125,7 +154,7 @@ typedef enum { R_BIN_LANG_JNI = 1U<<13, R_BIN_LANG_BLOCKS = 1U<<31, R_BIN_LANG_ANY = -1, -} RBinLanguage; +} RBinNameMangling; typedef enum { R_STRING_TYPE_DETECT = '?', @@ -137,55 +166,46 @@ typedef enum { } RStringType; // used for symbols, classes, methods... generic for elf, dex, pe, swift, ... -// unifies symbol flags, visibility, bind, type into a single generic field -// 64bit enums are problematic for old msvc and tcc, maybe just use defines here -// typedef enum { } RBinAttribute; -typedef uint64_t RBinAttribute; -#define R_BIN_ATTR_NONE (0) -#define R_BIN_ATTR_PUBLIC (1ULL << 0) -#define R_BIN_ATTR_OPEN (1ULL << 1) -#define R_BIN_ATTR_FILEPRIVATE (1ULL << 2) -#define R_BIN_ATTR_PRIVATE (1ULL << 3) -#define R_BIN_ATTR_HIDDEN (1ULL << 4) -#define R_BIN_ATTR_INTERNAL (1ULL << 5) // same as fileprivate? -#define R_BIN_ATTR_FRIENDLY (1ULL << 6) -#define R_BIN_ATTR_PROTECTED (1ULL << 7) -#define R_BIN_ATTR_SEALED (1ULL << 8) -#define R_BIN_ATTR_GLOBAL (1ULL << 9) -#define R_BIN_ATTR_WEAK (1ULL << 10) -#define R_BIN_ATTR_UNSAFE (1ULL << 11) -#define R_BIN_ATTR_CLASS (1ULL << 12) // class method (not instance method) -#define R_BIN_ATTR_EXTERN (1ULL << 13) -#define R_BIN_ATTR_READONLY (1ULL << 14) -#define R_BIN_ATTR_STATIC (1ULL << 15) // same as class attribute? -#define R_BIN_ATTR_CONST (1ULL << 16) -#define R_BIN_ATTR_VIRTUAL (1ULL << 17) -#define R_BIN_ATTR_MUTATING (1ULL << 18) -#define R_BIN_ATTR_FINAL (1ULL << 19) -#define R_BIN_ATTR_ABSTRACT (1ULL << 20) -#define R_BIN_ATTR_INTERFACE (1ULL << 21) -#define R_BIN_ATTR_SYNTHETIC (1ULL << 22) // synthesized methods -#define R_BIN_ATTR_SYMBOLIC (1ULL << 23) -#define R_BIN_ATTR_VERIFIED (1ULL << 24) -#define R_BIN_ATTR_MIRANDA (1ULL << 25) -#define R_BIN_ATTR_CONSTRUCTOR (1ULL << 26) -#define R_BIN_ATTR_GETTER (1ULL << 27) // accessor -#define R_BIN_ATTR_SETTER (1ULL << 28) // accessor -#define R_BIN_ATTR_OPTIMIZED (1ULL << 29) -//#define R_BIN_ATTR_ANNOTATED (1ULL << 30) -#define R_BIN_ATTR_BRIDGE (1ULL << 31) -#define R_BIN_ATTR_STRICT (1ULL << 32) -#define R_BIN_ATTR_ASYNC (1ULL << 33) -#define R_BIN_ATTR_SYNCHRONIZED (1ULL << 34) -#define R_BIN_ATTR_DECLARED_SYNCHRONIZED (1ULL << 35) -#define R_BIN_ATTR_VOLATILE (1ULL << 36) -#define R_BIN_ATTR_TRANSIENT (1ULL << 37) -#define R_BIN_ATTR_ENUM (1ULL << 38) -#define R_BIN_ATTR_NATIVE (1ULL << 39) -#define R_BIN_ATTR_RACIST (1ULL << 40) -#define R_BIN_ATTR_VARARGS (1ULL << 41) -#define R_BIN_ATTR_SUPER (1ULL << 42) -#define R_BIN_ATTR_ANNOTATION (1ULL << 43) +typedef enum { + // R2_590 rename to R_BIN_VISIBILITY // R_BIN_SCOPE_(PRIVATE|PUBLIC|..) ? + // see binclass.visibility_str + R_BIN_ATTR_PRIVATE, + R_BIN_ATTR_FILEPRIVATE, + R_BIN_ATTR_PUBLIC, + R_BIN_ATTR_HIDDEN, + R_BIN_ATTR_INTERNAL, // same as fileprivate? + R_BIN_ATTR_FRIENDLY, + R_BIN_ATTR_PROTECTED, + R_BIN_ATTR_SEALED, + R_BIN_ATTR_UNSAFE, + R_BIN_ATTR_ASYNC, + R_BIN_ATTR_EXTERN, + R_BIN_ATTR_READONLY, + R_BIN_ATTR_STATIC, + R_BIN_ATTR_CONST, + R_BIN_ATTR_VIRTUAL, + R_BIN_ATTR_MUTATING, + R_BIN_ATTR_FINAL, + R_BIN_ATTR_ABSTRACT, + R_BIN_ATTR_INTERFACE, + R_BIN_ATTR_SYNTHETIC, // synthesized methods + R_BIN_ATTR_SYMBOLIC, + R_BIN_ATTR_VERIFIED, + R_BIN_ATTR_MIRANDA, + R_BIN_ATTR_CONSTRUCTOR, + R_BIN_ATTR_ACCESSOR, // getter / setter + // R_BIN_ATTR_GETTER, // getter / setter + // R_BIN_ATTR_SETTER, // getter / setter + R_BIN_ATTR_OPTIMIZED, + R_BIN_ATTR_ANNOTATED, + R_BIN_ATTR_BRIDGE, + R_BIN_ATTR_STRICT, + R_BIN_ATTR_SYNCHRONIZED, + R_BIN_ATTR_VOLATILE, + R_BIN_ATTR_TRANSIENT, + R_BIN_ATTR_ENUM, + R_BIN_ATTR_NATIVE, +} RBinAttribute; typedef enum { R_BIN_RELOC_1 = 1, @@ -209,10 +229,10 @@ typedef struct r_bin_addr_t { } RBinAddr; typedef struct r_bin_name_t { + // char *name; // user-defined custom name TODO char *name; // demangled name char *oname; // original (mangled) name char *fname; // flag name - // char *uname; // user-defined custom name TODO } RBinName; typedef struct r_bin_hash_t { @@ -282,18 +302,21 @@ typedef struct r_bin_symbol_t { RBinName *cname; // R2_590 /* const-unique-strings */ const char *forwarder; - const char *bind; // tied to attr already - const char *type; // typed to attr already + const char *bind; + const char *type; const char *rtype; bool is_imported; /* only used by java */ + const char *visibility_str; ut64 vaddr; ut64 paddr; ut32 size; ut32 ordinal; + ut32 visibility; int lang; int bits; - RBinAttribute attr; // previously known as method_flags + visibility + /* see R_BIN_METH_* constants */ + ut64 method_flags; int dup_count; } RBinSymbol; @@ -322,6 +345,7 @@ typedef struct r_bin_import_t { char *classname; char *descriptor; ut32 ordinal; + ut32 visibility; // used by elf, so we just expose them here, so we can remove the internal representation dupe bool in_shdr; bool is_sht_null; @@ -593,15 +617,15 @@ typedef struct r_bin_class_t { char *name; // must be deprecated and use bname only RBinName *bname; // R2_590 RList *super; // list of RBinName - char *visibility_str; // XXX R2_590 - only used by dex+java should be ut32 or bitfield.. should be usable for swift too + char *visibility_str; // XXX only used by dex+java should be ut32 or bitfield.. should be usable for swift too int index; // should be unsigned? ut64 addr; char *ns; // namespace // maybe RBinName? RList *methods; // RList *fields; // // RList *interfaces; // - RBinAttribute attr; - ut64 lang; + int visibility; + int lang; } RBinClass; #define RBinSectionName r_offsetof(RBinSection, name) @@ -656,7 +680,7 @@ typedef struct r_bin_field_t { ut64 paddr; int size; int offset; - // ut32 visibility; // R2_590 - deprecate we have attr! + ut32 visibility; #if 0 RBinName *type; RBinName *name; @@ -669,8 +693,7 @@ typedef struct r_bin_field_t { char *comment; char *format; bool format_named; // whether format is the name of a format or a raw pf format string - // ut64 flags; // rename to attr and use R_BIN_ATTR_ - RBinAttribute attr; + ut64 flags; // rename to attr and use R_BIN_ATTR_ } RBinField; R_API const char *r_bin_field_kindstr(RBinField *f); @@ -750,7 +773,7 @@ R_API bool r_bin_open_io(RBin *bin, RBinFileOptions *opt); R_API bool r_bin_open_buf(RBin *bin, RBuffer *buf, RBinFileOptions *opt); R_API bool r_bin_reload(RBin *bin, ut32 bf_id, ut64 baseaddr); -R_API RBinClass *r_bin_class_new(const char *name, const char *super, ut64 attr); +R_API RBinClass *r_bin_class_new(const char *name, const char *super, int view); R_API void r_bin_class_free(RBinClass *); // uhm should be tied used because we dont want bincur to change because of open R_API RBinFile *r_bin_file_open(RBin *bin, const char *file, RBinFileOptions *opt); @@ -826,7 +849,7 @@ R_API RVecRBinSymbol *r_bin_file_get_symbols_vec(RBinFile *bf); // R_API ut64 r_bin_file_get_vaddr(RBinFile *bf, ut64 paddr, ut64 vaddr); // RBinFile.add -R_API RBinClass *r_bin_file_add_class(RBinFile *binfile, const char *name, const char *super, ut64 attr); +R_API RBinClass *r_bin_file_add_class(RBinFile *binfile, const char *name, const char *super, int view); R_API RBinSymbol *r_bin_file_add_method(RBinFile *bf, const char *classname, const char *name, int nargs); R_API RBinField *r_bin_file_add_field(RBinFile *binfile, const char *classname, const char *name); // RBinFile.find @@ -893,7 +916,7 @@ R_API char *r_bin_name_tostring2(RBinName *bn, int type); R_API void r_bin_name_demangled(RBinName *bn, const char *dname); R_API void r_bin_name_free(RBinName *bn); -R_API char *r_bin_attr_tostring(ut64 attr, bool singlechar); +R_API char *r_bin_attr_tostring(ut64 attr); R_API ut64 r_bin_attr_fromstring(const char *s); /* filter.c */ diff --git a/libr/include/r_core.h b/libr/include/r_core.h index 10727feb8c..b79ffa2e4f 100644 --- a/libr/include/r_core.h +++ b/libr/include/r_core.h @@ -824,7 +824,7 @@ typedef struct r_core_bin_filter_t { R_API bool r_core_bin_info(RCore *core, int action, PJ *pj, int mode, int va, RCoreBinFilter *filter, const char *chksum); R_API bool r_core_bin_set_arch_bits(RCore *r, const char *name, const char *arch, ut16 bits); R_API bool r_core_bin_update_arch_bits(RCore *r); -R_API char *r_core_bin_attr_tostring(ut64 flags, int mode); +R_API char *r_core_bin_method_flags_str(ut64 flags, int mode); R_API bool r_core_pdb_info(RCore *core, const char *file, PJ *pj, int mode); /* rtr */ diff --git a/shlr/java/class.c b/shlr/java/class.c index 1eea5fc461..4624bc7190 100644 --- a/shlr/java/class.c +++ b/shlr/java/class.c @@ -1,17 +1,17 @@ -/* Apache 2.0 - Copyright 2007-2023 - pancake, dso */ +/* Apache 2.0 - Copyright 2007-2023 - pancake and dso */ +/* class.c rewrite: Adam Pridgen */ #define R_LOG_ORIGIN "java.class" +#include #include #include "class.h" static inline RBinName *__bin_name_new(const char *name) { r_return_val_if_fail (name, NULL); RBinName *bn = R_NEW0 (RBinName); - if (bn) { - bn->oname = strdup (name); - // oname and dname - } + bn->oname = strdup (name); + // oname and dname return bn; } static inline void __bin_name_free(RBinName *bn) { @@ -49,6 +49,9 @@ R_API int r_bin_java_is_fm_type_protected(RBinJavaField *fm_type); R_API void U(add_cp_objs_to_sdb)(RBinJavaObj * bin); R_API void U(add_field_infos_to_sdb)(RBinJavaObj * bin); R_API void U(add_method_infos_to_sdb)(RBinJavaObj * bin); +R_API RList *retrieve_all_access_string_and_value(RBinJavaAccessFlags *access_flags); +R_API char *retrieve_access_string(ut16 flags, RBinJavaAccessFlags *access_flags); +R_API ut16 calculate_access_value(const char *access_flags_str, RBinJavaAccessFlags *access_flags); R_API int r_bin_java_new_bin(RBinJavaObj *bin, ut64 loadaddr, Sdb *kv, const ut8 *buf, ut64 len); R_API int extract_type_value(const char *arg_str, char **output); R_API int r_bin_java_check_reset_cp_obj(RBinJavaCPTypeObj *cp_obj, ut8 tag); @@ -312,7 +315,7 @@ static char *convert_string(const char *bytes, ut32 len) { return r_strbuf_drain (sb); } -static const RBinJavaAccessFlags FIELD_ACCESS_FLAGS[] = { +static RBinJavaAccessFlags FIELD_ACCESS_FLAGS[] = { { "public", R_BIN_JAVA_FIELD_ACC_PUBLIC, 6 }, { "private", R_BIN_JAVA_FIELD_ACC_PRIVATE, 7 }, { "protected", R_BIN_JAVA_FIELD_ACC_PROTECTED, 9 }, @@ -332,7 +335,7 @@ static const RBinJavaAccessFlags FIELD_ACCESS_FLAGS[] = { { NULL, 0, 0 } }; -static const RBinJavaAccessFlags METHOD_ACCESS_FLAGS[] = { +static RBinJavaAccessFlags METHOD_ACCESS_FLAGS[] = { { "public", R_BIN_JAVA_METHOD_ACC_PUBLIC, 6 }, { "private", R_BIN_JAVA_METHOD_ACC_PRIVATE, 7 }, { "protected", R_BIN_JAVA_METHOD_ACC_PROTECTED, 9 }, @@ -352,7 +355,7 @@ static const RBinJavaAccessFlags METHOD_ACCESS_FLAGS[] = { { NULL, 0, 0 } }; -// XXX - Fix these there are some incorrect ones +// XXX - Fix these there are some incorrect ongs static RBinJavaAccessFlags CLASS_ACCESS_FLAGS[] = { { "public", R_BIN_JAVA_CLASS_ACC_PUBLIC, 6 }, { "undefined.0x0002", 0x0002, 16 }, @@ -372,7 +375,6 @@ static RBinJavaAccessFlags CLASS_ACCESS_FLAGS[] = { { "undefined.0x8000", 0x8000, 16 }, { NULL, 0, 0 } }; - static RBinJavaRefMetas R_BIN_JAVA_REF_METAS[] = { { "Unknown", R_BIN_JAVA_REF_UNKNOWN }, { "GetField", R_BIN_JAVA_REF_GETFIELD }, @@ -402,7 +404,6 @@ static RBinJavaElementValueMetas R_BIN_JAVA_ELEMENT_VALUE_METAS[] = { { "Annotation", R_BIN_JAVA_EV_TAG_ANNOTATION, NULL }, { "Unknown", R_BIN_JAVA_EV_TAG_UNKNOWN, NULL }, }; - static RBinJavaVerificationMetas R_BIN_JAVA_VERIFICATION_METAS[] = { { "Top", R_BIN_JAVA_STACKMAP_TOP }, { "Integer", R_BIN_JAVA_STACKMAP_INTEGER }, @@ -415,7 +416,6 @@ static RBinJavaVerificationMetas R_BIN_JAVA_VERIFICATION_METAS[] = { { "Uninitialized", R_BIN_JAVA_STACKMAP_UNINIT }, { "Unknown", R_BIN_JAVA_STACKMAP_UNKNOWN } }; - static RBinJavaStackMapFrameMetas R_BIN_JAVA_STACK_MAP_FRAME_METAS[] = { { "ImplicitStackFrame", R_BIN_JAVA_STACK_FRAME_IMPLICIT, NULL }, { "Same", R_BIN_JAVA_STACK_FRAME_SAME, NULL }, @@ -595,14 +595,13 @@ R_API char *r_bin_java_unmangle_method(const char *flags, const char *name, cons return prototype; } -// TODO: we have demangle_java() already why this dupe R_API char *r_bin_java_unmangle(const char *flags, const char *name, const char *descriptor) { ut32 l_paren_pos = -1, r_paren_pos = -1; char *result = NULL; - ut32 desc_len = descriptor? strlen (descriptor) : 0; - ut32 name_len = name? strlen (name) : 0; - ut32 flags_len = flags? strlen (flags) : 0; - ut32 i = 0; + ut32 desc_len = descriptor && *descriptor ? strlen (descriptor) : 0, + name_len = name && *name ? strlen (name) : 0, + flags_len = flags && *flags ? strlen (flags) : 0, + i = 0; if (desc_len == 0 || name == 0) { return NULL; } @@ -651,14 +650,21 @@ R_API char *r_bin_java_unmangle(const char *flags, const char *name, const char R_API char *r_bin_java_get_bin_obj_json(RBinJavaObj *bin) { PJ *pj = pj_new (); + + // this is a class dictionary pj_o (pj); + + // get the initial class dict data r_bin_java_get_class_info_json (bin, pj); + // add named lists r_bin_java_get_method_json_definitions (bin, pj); r_bin_java_get_field_json_definitions (bin, pj); r_bin_java_get_import_json_definitions (bin, pj); //r_bin_java_get_interface_json_definitions (bin, pj); + pj_end (pj); + return pj_drain (pj); } @@ -697,21 +703,33 @@ R_API void r_bin_java_get_class_info_json(RBinJavaObj *bin, PJ *pj) { RBinClass *klass = r_list_get_n (classes, 0); // pj dict already opened - if (klass) { - pj_ki (pj, "access_flags", klass->attr); - pj_ki (pj, "is_public", ((klass->attr & R_BIN_JAVA_CLASS_ACC_PUBLIC) != 0)); - pj_ki (pj, "is_final", ((klass->attr & R_BIN_JAVA_CLASS_ACC_FINAL) != 0)); - pj_ki (pj, "is_super", ((klass->attr & R_BIN_JAVA_CLASS_ACC_SUPER) != 0)); - pj_ki (pj, "is_interface", ((klass->attr & R_BIN_JAVA_CLASS_ACC_INTERFACE) != 0)); - pj_ki (pj, "is_abstract", ((klass->attr & R_BIN_JAVA_CLASS_ACC_ABSTRACT) != 0)); - pj_ki (pj, "is_synthetic", ((klass->attr & R_BIN_JAVA_CLASS_ACC_SYNTHETIC) != 0)); - pj_ki (pj, "is_annotation", ((klass->attr & R_BIN_JAVA_CLASS_ACC_ANNOTATION) != 0)); - pj_ki (pj, "is_enum", ((klass->attr & R_BIN_JAVA_CLASS_ACC_ENUM) != 0)); + if (klass) { + int dummy = 0; + RListIter *iter; + RBinClass *klassv = NULL; + // add access flags like in methods + bool is_public = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_PUBLIC) != 0); + bool is_final = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_FINAL) != 0); + bool is_super = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_SUPER) != 0); + bool is_interface = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_INTERFACE) != 0); + bool is_abstract = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_ABSTRACT) != 0); + bool is_synthetic = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_SYNTHETIC) != 0); + bool is_annotation = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_ANNOTATION) != 0); + bool is_enum = ((klass->visibility & R_BIN_JAVA_CLASS_ACC_ENUM) != 0); + + pj_ki (pj, "access_flags", klass->visibility); + pj_ki (pj, "is_public", is_public); + pj_ki (pj, "is_final", is_final); + pj_ki (pj, "is_super", is_super); + pj_ki (pj, "is_interface", is_interface); + pj_ki (pj, "is_abstract", is_abstract); + pj_ki (pj, "is_synthetic", is_synthetic); + pj_ki (pj, "is_annotation", is_annotation); + pj_ki (pj, "is_enum", is_enum); pj_ks (pj, "name", klass->name); if (klass->super) { RBinName *bn; - RListIter *iter; pj_ka (pj, "super"); r_list_foreach (klass->super, iter, bn) { pj_ks (pj, "super", bn->name? bn->name: bn->oname); @@ -720,20 +738,18 @@ R_API void r_bin_java_get_class_info_json(RBinJavaObj *bin, PJ *pj) { } pj_ka (pj, "interfaces"); - RListIter *iter; - RBinClass *klassv; - bool dummy = false; + r_list_foreach (classes, iter, klassv) { if (!dummy) { - // skip the first .. because dunno - dummy = true; + dummy++; continue; } // enumerate all interface classes and append them to the interfaces - if ((klassv->attr & R_BIN_ATTR_INTERFACE) != 0) { + if ((klassv->visibility & R_BIN_JAVA_CLASS_ACC_INTERFACE) != 0) { pj_s (pj, klassv->name); } } + pj_end (pj); } r_list_free (classes); @@ -742,7 +758,7 @@ R_API void r_bin_java_get_class_info_json(RBinJavaObj *bin, PJ *pj) { // unused? R_API void r_bin_java_get_interface_json_definitions(RBinJavaObj *bin, PJ *pj) { RList *the_list; - RListIter *iter; + RListIter *iter = NULL; char *new_str; pj_ka (pj, "interfaces"); @@ -769,26 +785,34 @@ R_API void r_bin_java_get_interface_json_definitions(RBinJavaObj *bin, PJ *pj) { R_API void r_bin_java_get_method_json_definitions(RBinJavaObj *bin, PJ *pj) { r_return_if_fail (pj); - RListIter *iter; - RBinJavaField *fm_type; + RBinJavaField *fm_type = NULL; + RListIter *iter = NULL; + pj_ka (pj, "methods"); - if (bin) { - r_list_foreach (bin->methods_list, iter, fm_type) { - r_bin_java_get_method_json_definition (bin, fm_type, pj); - } + if (!bin) { + pj_end (pj); + return; + } + + r_list_foreach (bin->methods_list, iter, fm_type) { + r_bin_java_get_method_json_definition (bin, fm_type, pj); } pj_end (pj); } R_API void r_bin_java_get_field_json_definitions(RBinJavaObj *bin, PJ *pj) { r_return_if_fail (pj); - RBinJavaField *fm_type; - RListIter *iter; + RBinJavaField *fm_type = NULL; + RListIter *iter = NULL; + pj_ka (pj, "fields"); - if (bin) { - r_list_foreach (bin->fields_list, iter, fm_type) { - r_bin_java_get_field_json_definition (bin, fm_type, pj); - } + if (!bin) { + pj_end (pj); + return; + } + + r_list_foreach (bin->fields_list, iter, fm_type) { + r_bin_java_get_field_json_definition (bin, fm_type, pj); } pj_end (pj); } @@ -819,24 +843,31 @@ R_API char *r_bin_java_create_field_fq_str(const char *klass, const char *name, return r_str_newf ("%s %s.%s", signature, klass, name); } -R_API void r_bin_java_get_fm_type_definition_json(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj, bool is_method) { +R_API void r_bin_java_get_fm_type_definition_json(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj, int is_method) { r_return_if_fail (bin && fm_type && pj); + ut64 addr = UT64_MAX; + char *prototype = NULL, *fq_name = NULL; + bool is_native = ((fm_type->flags & R_BIN_JAVA_METHOD_ACC_NATIVE) != 0); + bool is_static = ((fm_type->flags & R_BIN_JAVA_METHOD_ACC_STATIC) != 0); + bool is_synthetic = ((fm_type->flags & R_BIN_JAVA_METHOD_ACC_SYNTHETIC) != 0); + bool is_private = ((fm_type->flags & R_BIN_JAVA_METHOD_ACC_PRIVATE) != 0); + bool is_public = ((fm_type->flags & R_BIN_JAVA_METHOD_ACC_PUBLIC) != 0); + bool is_protected = ((fm_type->flags & R_BIN_JAVA_METHOD_ACC_PROTECTED) != 0); + bool is_super = ((fm_type->flags & R_BIN_JAVA_CLASS_ACC_SUPER) != 0); pj_o (pj); - const ut32 flags = fm_type->flags; - // TODO: should be booleans - pj_ki (pj, "access_flags", flags); + pj_ki (pj, "access_flags", fm_type->flags); pj_ki (pj, "is_method", is_method); - pj_ki (pj, "is_native", (flags & R_BIN_JAVA_METHOD_ACC_NATIVE) != 0); - pj_ki (pj, "is_synthetic", (flags & R_BIN_JAVA_METHOD_ACC_SYNTHETIC) != 0); - pj_ki (pj, "is_private", (flags & R_BIN_JAVA_METHOD_ACC_PRIVATE) != 0); - pj_ki (pj, "is_public", (flags & R_BIN_JAVA_METHOD_ACC_PUBLIC) != 0); - pj_ki (pj, "is_static", (flags & R_BIN_JAVA_METHOD_ACC_STATIC) != 0); - pj_ki (pj, "is_protected", (flags & R_BIN_JAVA_METHOD_ACC_PROTECTED) != 0); - pj_ki (pj, "is_super", (flags & R_BIN_JAVA_CLASS_ACC_SUPER) != 0); + pj_ki (pj, "is_native", is_native); + pj_ki (pj, "is_synthetic", is_synthetic); + pj_ki (pj, "is_private", is_private); + pj_ki (pj, "is_public", is_public); + pj_ki (pj, "is_static", is_static); + pj_ki (pj, "is_protected", is_protected); + pj_ki (pj, "is_super", is_super); - ut64 addr = r_bin_java_get_method_code_offset (fm_type); + addr = r_bin_java_get_method_code_offset (fm_type); if (addr == 0) { addr = fm_type->file_offset; } @@ -848,7 +879,6 @@ R_API void r_bin_java_get_fm_type_definition_json(RBinJavaObj *bin, RBinJavaFiel pj_ks (pj, "signature", fm_type->descriptor); pj_ks (pj, "name", fm_type->name); - char *fq_name = NULL; if (is_method) { fq_name = r_bin_java_create_method_fq_str (fm_type->class_name, fm_type->name, fm_type->descriptor); } else { @@ -857,7 +887,7 @@ R_API void r_bin_java_get_fm_type_definition_json(RBinJavaObj *bin, RBinJavaFiel pj_ks (pj, "fq_name", fq_name); free (fq_name); - char *prototype = r_bin_java_unmangle (fm_type->flags_str, fm_type->name, fm_type->descriptor); + prototype = r_bin_java_unmangle (fm_type->flags_str, fm_type->name, fm_type->descriptor); pj_ks (pj, "prototype", prototype); free (prototype); @@ -873,11 +903,11 @@ R_API char *r_bin_java_get_field_definition(RBinJavaField *fm_type) { } R_API void r_bin_java_get_method_json_definition(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj) { - r_bin_java_get_fm_type_definition_json (bin, fm_type, pj, true); + r_bin_java_get_fm_type_definition_json (bin, fm_type, pj, 1); } R_API void r_bin_java_get_field_json_definition(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj) { - r_bin_java_get_fm_type_definition_json (bin, fm_type, pj, false); + r_bin_java_get_fm_type_definition_json (bin, fm_type, pj, 0); } R_API int r_bin_java_extract_reference_name(const char *input_str, char **ref_str, ut8 array_cnt) { @@ -1037,13 +1067,11 @@ R_API RList *r_bin_java_extract_type_values(const char *arg_str) { } R_API int r_bin_java_is_fm_type_private(RBinJavaField *fm_type) { - if (fm_type) { - if (fm_type->type == R_BIN_JAVA_FIELD_TYPE_METHOD) { - return fm_type->flags & R_BIN_JAVA_METHOD_ACC_PRIVATE; - } - if (fm_type->type == R_BIN_JAVA_FIELD_TYPE_FIELD) { - return fm_type->flags & R_BIN_JAVA_FIELD_ACC_PRIVATE; - } + if (fm_type && fm_type->type == R_BIN_JAVA_FIELD_TYPE_METHOD) { + return fm_type->flags & R_BIN_JAVA_METHOD_ACC_PRIVATE; + } + if (fm_type && fm_type->type == R_BIN_JAVA_FIELD_TYPE_FIELD) { + return fm_type->flags & R_BIN_JAVA_FIELD_ACC_PRIVATE; } return 0; } @@ -1061,18 +1089,18 @@ R_API int r_bin_java_is_fm_type_protected(RBinJavaField *fm_type) { R_API RList *r_bin_java_get_args(RBinJavaField *fm_type) { RList *the_list = r_bin_java_extract_type_values (fm_type->descriptor); RList *arg_list = r_list_new (); - bool in_args = false; + ut8 in_args = 0; RListIter *desc_iter; char *str; r_list_foreach (the_list, desc_iter, str) { - if (!str) { + if (str && *str == '(') { + in_args = 1; continue; - } else if (*str == '(') { - in_args = true; - continue; - } else if (*str == ')') { + } + if (str && *str == ')') { break; - } else if (in_args) { + } + if (in_args && str) { r_list_append (arg_list, strdup (str)); } } @@ -1102,11 +1130,11 @@ R_API char *r_bin_java_get_this_class_name(RBinJavaObj *bin) { return (bin->cf2.this_class_name ? strdup (bin->cf2.this_class_name) : strdup ("unknown")); } -R_API ut16 calculate_access_value(const char *access_flags_str, const RBinJavaAccessFlags *access_flags) { +R_API ut16 calculate_access_value(const char *access_flags_str, RBinJavaAccessFlags *access_flags) { ut16 result = 0; ut16 size = strlen (access_flags_str) + 1; char *p_flags, *my_flags = malloc (size); - const RBinJavaAccessFlags *iter = NULL; + RBinJavaAccessFlags *iter = NULL; char *save_ptr = NULL; if (size < 5 || !my_flags) { free (my_flags); @@ -1134,27 +1162,57 @@ R_API ut16 calculate_access_value(const char *access_flags_str, const RBinJavaAc return result; } -R_API RList *retrieve_all_access_string_and_value(const RBinJavaAccessFlags *access_flags) { - RList *result = r_list_newf (free); - ut32 i; - for (i = 0; access_flags[i].str; i++) { - r_list_append (result, r_str_newf ("%s = 0x%04x", access_flags[i].str, access_flags[i].value)); +R_API RList *retrieve_all_access_string_and_value(RBinJavaAccessFlags *access_flags) { + const char *fmt = "%s = 0x%04x"; + RList *result = r_list_new (); + if (!result) { + return NULL; + } + result->free = free; + int i = 0; + for (i = 0; access_flags[i].str != NULL; i++) { + char *str = malloc (50); + if (!str) { + r_list_free (result); + return NULL; + } + snprintf (str, 49, fmt, access_flags[i].str, access_flags[i].value); + r_list_append (result, str); } return result; } -R_API char *retrieve_access_string(ut16 flags, const RBinJavaAccessFlags *access_flags) { - RStrBuf *sb = r_strbuf_new (""); - int i; - for (i = 0; access_flags[i].str; i++) { +R_API char *retrieve_access_string(ut16 flags, RBinJavaAccessFlags *access_flags) { + char *outbuffer = NULL, *cur_pos = NULL; + ut16 i; + ut16 max_str_len = 0; + for (i = 0; access_flags[i].str != NULL; i++) { if (flags & access_flags[i].value) { - if (!r_strbuf_is_empty (sb)) { - r_strbuf_append (sb, " "); + max_str_len += (strlen (access_flags[i].str) + 1); + if (max_str_len < strlen (access_flags[i].str)) { + return NULL; } - r_strbuf_append (sb, access_flags[i].str); } } - return r_strbuf_drain (sb); + max_str_len++; + outbuffer = (char *) malloc (max_str_len); + if (outbuffer) { + memset (outbuffer, 0, max_str_len); + cur_pos = outbuffer; + for (i = 0; access_flags[i].str != NULL; i++) { + if (flags & access_flags[i].value) { + ut8 len = strlen (access_flags[i].str); + const char *the_string = access_flags[i].str; + memcpy (cur_pos, the_string, len); + memcpy (cur_pos + len, " ", 1); + cur_pos += len + 1; + } + } + if (cur_pos != outbuffer) { + *(cur_pos - 1) = 0; + } + } + return outbuffer; } R_API char *retrieve_method_access_string(ut16 flags) { @@ -1171,8 +1229,8 @@ R_API char *retrieve_class_method_access_string(ut16 flags) { R_API char *r_bin_java_build_obj_key(RBinJavaObj *bin) { char *cname = r_bin_java_get_this_class_name (bin); - char *jvcname = cname - ? r_str_newf ("%d.%s.class", bin->id, cname) + char *jvcname = cname? + r_str_newf ("%d.%s.class", bin->id, cname) : r_str_newf ("%d._unknown_.class", bin->id); free (cname); return jvcname; @@ -1220,20 +1278,19 @@ R_API RBinJavaElementValueMetas *r_bin_java_get_ev_meta_from_tag(ut8 tag) { } R_API ut8 r_bin_java_quick_check(ut8 expected_tag, ut8 actual_tag, ut32 actual_len, const char *name) { + ut8 res = 0; if (expected_tag > R_BIN_JAVA_CP_METAS_SZ) { R_LOG_WARN ("Invalid tag '%d' expected 0x%02x for %sn", actual_tag, expected_tag, name); - return 1; - } - if (expected_tag != actual_tag) { + res = 1; + } else if (expected_tag != actual_tag) { R_LOG_WARN ("Invalid tag '%d' expected 0x%02x for %s", actual_tag, expected_tag, name); - return 1; - } - if (actual_len < R_BIN_JAVA_CP_METAS[expected_tag].len) { + res = 1; + } else if (actual_len < R_BIN_JAVA_CP_METAS[expected_tag].len) { R_LOG_WARN ("Unable to parse '%d' expected sz=0x%02x got 0x%02x for %s", actual_tag, R_BIN_JAVA_CP_METAS[expected_tag].len, actual_len, name); - return 2; + res = 2; } - return 0; + return res; } R_API ut64 r_bin_java_raw_to_long(const ut8 *raw, ut64 offset) { @@ -1357,8 +1414,9 @@ R_API RBinJavaField *r_bin_java_read_next_method(RBinJavaObj *bin, const ut64 of R_LOG_DEBUG ("Parsing %s(%s)", method->name, method->descriptor); if (method->attr_count > 0) { method->attr_offset = adv + offset; + RBinJavaAttrInfo *attr = NULL; for (i = 0; i < method->attr_count; i++) { - RBinJavaAttrInfo *attr = r_bin_java_read_next_attr (bin, adv + offset, buf, len); + attr = r_bin_java_read_next_attr (bin, adv + offset, buf, len); if (!attr) { R_LOG_ERROR ("unable to parse remainder of classfile after Method Attribute: %d", i); return NULL; @@ -1580,20 +1638,25 @@ R_API RBinJavaInterfaceInfo *r_bin_java_read_next_interface_item(RBinJavaObj *bi return ifobj; } -/** - Search through the Constant Pool list for the given CP Index. - If the idx not found by directly going to the list index, - the list will be walked and then the IDX will be checked. - - rvalue: new char* for caller to free. - */ R_API char *r_bin_java_get_utf8_from_bin_cp_list(RBinJavaObj *bin, ut64 idx) { r_return_val_if_fail (bin, NULL); + /* + Search through the Constant Pool list for the given CP Index. + If the idx not found by directly going to the list index, + the list will be walked and then the IDX will be checked. + rvalue: new char* for caller to free. + */ return r_bin_java_get_utf8_from_cp_item_list (bin->cp_list, idx); } R_API ut32 r_bin_java_get_utf8_len_from_bin_cp_list(RBinJavaObj *bin, ut64 idx) { r_return_val_if_fail (bin, 0); + /* + Search through the Constant Pool list for the given CP Index. + If the idx not found by directly going to the list index, + the list will be walked and then the IDX will be checked. + rvalue: new char* for caller to free. + */ return r_bin_java_get_utf8_len_from_cp_item_list (bin->cp_list, idx); } @@ -1817,21 +1880,22 @@ R_API char *r_bin_java_get_desc_from_cp_item_list(RList *cp_list, ut64 idx) { return r_bin_java_get_item_desc_from_cp_item_list (cp_list, obj, MAX_CPITEMS); } -/** - Search through a methods attributes and return the code attr. - rvalue: RBinJavaAttrInfo* if found otherwise NULL. - */ R_API RBinJavaAttrInfo *r_bin_java_get_method_code_attribute(const RBinJavaField *method) { + /* + Search through a methods attributes and return the code attr. + rvalue: RBinJavaAttrInfo* if found otherwise NULL. + */ + RBinJavaAttrInfo *res = NULL, *attr = NULL; + RListIter *iter; if (method) { - RListIter *iter; - RBinJavaAttrInfo *attr; r_list_foreach (method->attributes, iter, attr) { if (attr && (attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR)) { - return attr; + res = attr; + break; } } } - return NULL; + return res; } R_API RBinJavaAttrInfo *r_bin_java_get_attr_from_field(RBinJavaField *field, R_BIN_JAVA_ATTR_TYPE attr_type, ut32 pos) { @@ -1862,7 +1926,8 @@ R_API ut8 *r_bin_java_get_attr_buf(RBinJavaObj *bin, ut64 sz, const ut64 offset, const ut8 *a_buf = offset + buf; ut8 *attr_buf = (ut8 *) calloc (pending + 1, 1); if (!attr_buf) { - R_LOG_ERROR ("Unable to allocate 0x%04"PFMT64x "for an attribute", sz); + eprintf ("Unable to allocate enough bytes (0x%04"PFMT64x + ") to read in the attribute.\n", sz); return attr_buf; } memcpy (attr_buf, a_buf, pending); // sz+1); @@ -1894,7 +1959,7 @@ R_API RBinJavaAttrInfo *r_bin_java_default_attr_new(RBinJavaObj *bin, ut8 *buffe if (!attr->name) { // Something bad has happened attr->name = strdup ("NULL"); - R_LOG_ERROR ("r_bin_java_default_attr_new: Unable to find the name for %d index", attr->name_idx); + eprintf ("r_bin_java_default_attr_new: Unable to find the name for %d index.\n", attr->name_idx); } type_info = r_bin_java_get_attr_type_by_name (attr->name); attr->metas->ord = (R_BIN_JAVA_GLOBAL_BIN->attr_idx++); @@ -1904,7 +1969,7 @@ R_API RBinJavaAttrInfo *r_bin_java_default_attr_new(RBinJavaObj *bin, ut8 *buffe } R_API RBinJavaAttrMetas *r_bin_java_get_attr_type_by_name(const char *name) { - // TODO: slow, use sdb/hashtable here + // TODO: use sdb/hashtable here int i; for (i = 0; i < RBIN_JAVA_ATTRS_METAS_SZ; i++) { if (!strcmp ((const char *) name, RBIN_JAVA_ATTRS_METAS[i].name)) { @@ -1938,26 +2003,28 @@ R_API RBinJavaAttrInfo *r_bin_java_read_next_attr(RBinJavaObj *bin, const ut64 o if (offset < buf_len) { attr = r_bin_java_read_next_attr_from_buffer (bin, buffer, buf_len - offset, offset); free (buffer); - if (attr) { - attr->size = sz; + if (!attr) { + return NULL; } + attr->size = sz; } else { free (buffer); - R_LOG_ERROR ("Prevented OOB reading attr"); + eprintf ("IS OOB\n"); } return attr; } R_API RBinJavaAttrInfo *r_bin_java_read_next_attr_from_buffer(RBinJavaObj *bin, ut8 *buffer, st64 sz, st64 buf_offset) { RBinJavaAttrInfo *attr = NULL; + st64 nsz; if (!buffer || ((int) sz) < 4 || buf_offset < 0) { - R_LOG_ERROR ("r_bin_Java_read_next_attr_from_buffer: invalid buffer size %d", (int) sz); + eprintf ("r_bin_Java_read_next_attr_from_buffer: invalid buffer size %d\n", (int) sz); return NULL; } ut16 name_idx = R_BIN_JAVA_USHORT (buffer, 0); ut64 offset = 2; - st64 nsz = R_BIN_JAVA_UINT (buffer, offset); + nsz = R_BIN_JAVA_UINT (buffer, offset); // DEAD INCREMENT offset += 4; char *name = r_bin_java_get_utf8_from_bin_cp_list (R_BIN_JAVA_GLOBAL_BIN, name_idx); @@ -1977,7 +2044,7 @@ R_API RBinJavaAttrInfo *r_bin_java_read_next_attr_from_buffer(RBinJavaObj *bin, attr->metas->ord = (R_BIN_JAVA_GLOBAL_BIN->attr_idx++); } } else { - R_LOG_ERROR ("r_bin_java_read_next_attr_from_buffer: Cannot find type_info for %s", name); + eprintf ("r_bin_java_read_next_attr_from_buffer: Cannot find type_info for %s\n", name); } free (name); return attr; @@ -2056,6 +2123,7 @@ R_API ut64 r_bin_java_parse_cp_pool(RBinJavaObj *bin, const ut64 offset, const u R_API ut64 r_bin_java_parse_interfaces(RBinJavaObj *bin, const ut64 offset, const ut8 *buf, const ut64 len) { int i = 0; ut64 adv = 0; + RBinJavaInterfaceInfo *interfaces_obj; const ut8 *if_buf = buf + offset; bin->cp_offset = offset; bin->interfaces_offset = offset; @@ -2070,14 +2138,15 @@ R_API ut64 r_bin_java_parse_interfaces(RBinJavaObj *bin, const ut64 offset, cons IFDBG eprintf ("Interfaces count: %d\n", bin->interfaces_count); if (bin->interfaces_count > 0) { for (i = 0; i < bin->interfaces_count; i++) { - RBinJavaInterfaceInfo *interfaces_obj = r_bin_java_read_next_interface_item (bin, offset + adv, buf, len); - if (!interfaces_obj) { - break; - } - r_list_append (bin->interfaces_list, interfaces_obj); - adv += interfaces_obj->size; - if (offset + adv > len) { - R_LOG_ERROR ("Unable to parse remainder of classfile after Interface: %d", i); + interfaces_obj = r_bin_java_read_next_interface_item (bin, offset + adv, buf, len); + if (interfaces_obj) { + r_list_append (bin->interfaces_list, interfaces_obj); + adv += interfaces_obj->size; + if (offset + adv > len) { + eprintf ("[X] r_bin_java: Error unable to parse remainder of classfile after Interface: %d.\n", i); + break; + } + } else { break; } } @@ -2108,7 +2177,7 @@ R_API ut64 r_bin_java_parse_fields(RBinJavaObj *bin, const ut64 offset, const ut r_list_append (bin->fields_list, field); IFDBG r_bin_java_print_field_summary (field); if (adv + offset > len) { - R_LOG_ERROR ("r_bin_java: Error unable to parse remainder of classfile after Field: %d", i); + eprintf ("[X] r_bin_java: Error unable to parse remainder of classfile after Field: %d.\n", i); break; } } else { @@ -2278,7 +2347,9 @@ R_API int r_bin_java_load_bin(RBinJavaObj *bin, const ut8 *buf, ut64 buf_sz) { } R_API char *r_bin_java_get_version(RBinJavaObj *bin) { - return r_str_newf ("0x%02x%02x 0x%02x%02x", bin->cf.major[1], bin->cf.major[0], bin->cf.minor[1], bin->cf.minor[0]); + return r_str_newf ("0x%02x%02x 0x%02x%02x", + bin->cf.major[1], bin->cf.major[0], + bin->cf.minor[1], bin->cf.minor[0]); } R_API RList *r_bin_java_get_entrypoints(RBinJavaObj *bin) { @@ -2327,95 +2398,86 @@ R_API RBinJavaField *r_bin_java_get_method_code_attribute_with_addr(RBinJavaObj R_API RBinAddr *r_bin_java_get_entrypoint(RBinJavaObj *bin, int sym) { RBinAddr *ret = R_NEW0 (RBinAddr); - if (R_LIKELY (ret)) { + if (!ret) { + return NULL; + } + ret->paddr = UT64_MAX; + switch (sym) { + case R_BIN_SYM_ENTRY: + case R_BIN_SYM_INIT: + ret->paddr = r_bin_java_find_method_offset (bin, ""); + if (ret->paddr == UT64_MAX) { + ret->paddr = r_bin_java_find_method_offset (bin, ""); + } + break; + case R_BIN_SYM_FINI: ret->paddr = UT64_MAX; - switch (sym) { - case R_BIN_SYM_ENTRY: - case R_BIN_SYM_INIT: - ret->paddr = r_bin_java_find_method_offset (bin, ""); - if (ret->paddr == UT64_MAX) { - ret->paddr = r_bin_java_find_method_offset (bin, ""); - } - break; - case R_BIN_SYM_FINI: - ret->paddr = UT64_MAX; - break; - case R_BIN_SYM_MAIN: - ret->paddr = r_bin_java_find_method_offset (bin, "main"); - break; - default: - ret->paddr = -1; - } - if (ret->paddr != -1) { - ret->paddr += bin->loadaddr; - } + break; + case R_BIN_SYM_MAIN: + ret->paddr = r_bin_java_find_method_offset (bin, "main"); + break; + default: + ret->paddr = -1; + } + if (ret->paddr != -1) { + ret->paddr += bin->loadaddr; } return ret; } R_API ut64 r_bin_java_get_method_code_size(RBinJavaField *fm_type) { - RListIter *iter; - RBinJavaAttrInfo *attr; - r_list_foreach (fm_type->attributes, iter, attr) { + RListIter *attr_iter = NULL, *attr_iter_tmp = NULL; + RBinJavaAttrInfo *attr = NULL; + ut64 sz = 0; + r_list_foreach_safe (fm_type->attributes, attr_iter, attr_iter_tmp, attr) { if (attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) { - return attr->info.code_attr.code_length; + sz = attr->info.code_attr.code_length; + break; } } - return 0; + return sz; } R_API ut64 r_bin_java_find_method_offset(RBinJavaObj *bin, const char *method_name) { - RListIter *iter; - RBinJavaField *method; - r_list_foreach (bin->methods_list, iter, method) { + RListIter *attr_iter = NULL, *attr_iter_tmp = NULL; + RBinJavaField *method = NULL; + ut64 offset = -1; + r_list_foreach_safe (bin->methods_list, attr_iter, attr_iter_tmp, method) { if (method && !strcmp ((const char *) method->name, method_name)) { - return r_bin_java_get_method_code_offset (method) + bin->loadaddr; + offset = r_bin_java_get_method_code_offset (method) + bin->loadaddr; + break; } } - return UT64_MAX; + return offset; } R_API ut64 r_bin_java_get_method_code_offset(RBinJavaField *fm_type) { - RListIter *iter; - RBinJavaAttrInfo *attr; - r_list_foreach (fm_type->attributes, iter, attr) { + RListIter *attr_iter = NULL, *attr_iter_tmp = NULL; + RBinJavaAttrInfo *attr = NULL; + ut64 offset = 0; + r_list_foreach_safe (fm_type->attributes, attr_iter, attr_iter_tmp, attr) { if (attr->type == R_BIN_JAVA_ATTR_TYPE_CODE_ATTR) { - return attr->info.code_attr.code_offset; + offset = attr->info.code_attr.code_offset; + break; } } - return 0LL; + return offset; } -static inline ut64 fieldattr_j2r(ut32 ja) { - RBinAttribute attr = 0; - if (ja & R_BIN_JAVA_FIELD_ACC_PUBLIC) { - attr |= R_BIN_ATTR_PUBLIC; - } else if (ja & R_BIN_JAVA_FIELD_ACC_PRIVATE) { - attr |= R_BIN_ATTR_PRIVATE; - } else if (ja & R_BIN_JAVA_FIELD_ACC_PROTECTED) { - attr |= R_BIN_ATTR_PROTECTED; +R_API RBinField *r_bin_java_allocate_rbinfield(void) { + RBinField *t = (RBinField *) malloc (sizeof (RBinField)); + if (t) { + memset (t, 0, sizeof (RBinField)); } - if (ja & R_BIN_JAVA_FIELD_ACC_ENUM) { - attr |= R_BIN_ATTR_ENUM; - } - if (ja & R_BIN_JAVA_FIELD_ACC_VOLATILE) { - attr |= R_BIN_ATTR_VOLATILE; - } - if (ja & R_BIN_JAVA_FIELD_ACC_FINAL) { - attr |= R_BIN_ATTR_FINAL; - } - if (ja & R_BIN_JAVA_FIELD_ACC_STATIC) { - attr |= R_BIN_ATTR_STATIC; - } - return attr; + return t; } R_API RBinField *r_bin_java_create_new_rbinfield_from_field(RBinJavaField *fm_type, ut64 baddr) { - RBinField *field = R_NEW0 (RBinField); + RBinField *field = r_bin_java_allocate_rbinfield (); if (field) { field->name = strdup (fm_type->name); field->paddr = fm_type->file_offset + baddr; - field->attr = fieldattr_j2r (fm_type->flags); + field->visibility = fm_type->flags; } return field; } @@ -2453,12 +2515,10 @@ R_API RBinSymbol *r_bin_java_create_new_symbol_from_field(RBinJavaField *fm_type sym->classname = strdup ("UNKNOWN"); // dupped names? } sym->ordinal = fm_type->metas->ord; - sym->attr = fm_type->flags; -#if 0 + sym->visibility = fm_type->flags; if (fm_type->flags_str) { sym->visibility_str = strdup (fm_type->flags_str); } -#endif } return sym; } @@ -2494,47 +2554,48 @@ R_API RBinSymbol *r_bin_java_create_new_symbol_from_fm_type_meta(RBinJavaField * sym->vaddr = fm_type->file_offset + baddr; sym->ordinal = fm_type->metas->ord; sym->size = fm_type->size; - sym->attr = fm_type->flags; -#if 0 + sym->visibility = fm_type->flags; if (fm_type->flags_str) { sym->visibility_str = strdup (fm_type->flags_str); } -#endif return sym; } R_API RBinSymbol *r_bin_java_create_new_symbol_from_ref(RBinJavaObj *bin, RBinJavaCPTypeObj *obj, ut64 baddr) { RBinSymbol *sym = R_NEW0 (RBinSymbol); - if (!sym || !obj) { + if (!sym) { return NULL; } - switch (obj->tag) { - case R_BIN_JAVA_CP_METHODREF: - case R_BIN_JAVA_CP_INTERFACEMETHOD_REF: - case R_BIN_JAVA_CP_FIELDREF: - break; - default: + char *class_name, *name, *type_name; + if (!obj || (obj->tag != R_BIN_JAVA_CP_METHODREF && + obj->tag != R_BIN_JAVA_CP_INTERFACEMETHOD_REF && + obj->tag != R_BIN_JAVA_CP_FIELDREF)) { R_FREE (sym); - return NULL; + return sym; } - char *name = r_bin_java_get_name_from_bin_cp_list (bin, obj->info.cp_method.name_and_type_idx); - if (name) { - sym->name = name; - name = NULL; + if (sym) { + class_name = r_bin_java_get_name_from_bin_cp_list (bin, + obj->info.cp_method.class_idx); + name = r_bin_java_get_name_from_bin_cp_list (bin, + obj->info.cp_method.name_and_type_idx); + type_name = r_bin_java_get_name_from_bin_cp_list (bin, + obj->info.cp_method.name_and_type_idx); + if (name) { + sym->name = name; + name = NULL; + } + if (type_name) { + sym->type = r_str_constpool_get (&bin->constpool, type_name); + R_FREE (type_name); + } + if (class_name) { + sym->classname = strdup (class_name); + } + sym->paddr = obj->file_offset + baddr; + sym->vaddr = obj->file_offset + baddr; + sym->ordinal = obj->metas->ord; + sym->size = 0; } - char *type_name = r_bin_java_get_name_from_bin_cp_list (bin, obj->info.cp_method.name_and_type_idx); - if (type_name) { - sym->type = r_str_constpool_get (&bin->constpool, type_name); - R_FREE (type_name); - } - char *class_name = r_bin_java_get_name_from_bin_cp_list (bin, obj->info.cp_method.class_idx); - if (class_name) { - sym->classname = strdup (class_name); - } - sym->paddr = obj->file_offset + baddr; - sym->vaddr = obj->file_offset + baddr; - sym->ordinal = obj->metas->ord; - sym->size = 0; return sym; } @@ -2710,35 +2771,36 @@ R_API RList *r_bin_java_enum_class_fields(RBinJavaObj *bin, ut16 class_idx) { return fields; } -static bool is_class_interface(RBinJavaObj *bin, RBinJavaCPTypeObj *cp_obj) { +R_API int is_class_interface(RBinJavaObj *bin, RBinJavaCPTypeObj *cp_obj) { RBinJavaInterfaceInfo *ifobj; RListIter *iter; + int res = false; r_list_foreach (bin->interfaces_list, iter, ifobj) { if (ifobj) { - if (cp_obj == ifobj->cp_class) { - return true; + res = cp_obj == ifobj->cp_class; + if (res) { + break; } } } - return false; + return res; } - -#if 0 -R_API RList * r_bin_java_get_interface_classes(RBinJavaObj * bin) { - RList *interfaces_names = r_list_new (); - RListIter *iter; - RBinJavaInterfaceInfo *ifobj; - r_list_foreach(bin->interfaces_list, iter, iinfo) { - RBinClass *class_ = R_NEW0 (RBinClass); - RBinJavaCPTypeObj *cp_obj = ; - if (ifobj && ifobj->name) { - ut8 * name = strdup(ifobj->name); - r_list_append(interfaces_names, name); - } - } - return interfaces_names; -} -#endif +/* + R_API RList * r_bin_java_get_interface_classes(RBinJavaObj * bin) { + RList *interfaces_names = r_list_new (); + RListIter *iter; + RBinJavaInterfaceInfo *ifobj; + r_list_foreach(bin->interfaces_list, iter, iinfo) { + RBinClass *class_ = R_NEW0 (RBinClass); + RBinJavaCPTypeObj *cp_obj = ; + if (ifobj && ifobj->name) { + ut8 * name = strdup(ifobj->name); + r_list_append(interfaces_names, name); + } + } + return interfaces_names; + } +*/ R_API RList *r_bin_java_get_lib_names(RBinJavaObj *bin) { RList *lib_names = r_list_newf (free); @@ -2759,21 +2821,20 @@ R_API RList *r_bin_java_get_lib_names(RBinJavaObj *bin) { return lib_names; } -// XXX dupe because we cant link to rbin -static inline void __bin_class_free(void /*RBinClass*/ *k) { +R_API void r_bin_java_classes_free(void /*RBinClass*/ *k) { RBinClass *klass = k; if (klass) { r_list_free (klass->methods); r_list_free (klass->fields); free (klass->name); free (klass->super); - // free (klass->visibility_str); + free (klass->visibility_str); free (klass); } } R_API RList *r_bin_java_get_classes(RBinJavaObj *bin) { - RList *classes = r_list_newf ((void *)__bin_class_free); + RList *classes = r_list_newf (r_bin_java_classes_free); RListIter *iter; RBinJavaCPTypeObj *cp_obj = NULL; RBinJavaCPTypeObj *this_class_cp_obj = r_bin_java_get_item_from_bin_cp_list (bin, bin->cf2.this_class); @@ -2783,12 +2844,10 @@ R_API RList *r_bin_java_get_classes(RBinJavaObj *bin) { r_list_free (classes); return NULL; } - k->attr = bin->cf2.access_flags; -#if 0 + k->visibility = bin->cf2.access_flags; if (bin->cf2.flags_str) { k->visibility_str = strdup (bin->cf2.flags_str); } -#endif k->methods = r_bin_java_enum_class_methods (bin, bin->cf2.this_class); k->fields = r_bin_java_enum_class_fields (bin, bin->cf2.this_class); k->name = r_bin_java_get_this_class_name (bin); @@ -2884,7 +2943,7 @@ R_API void r_bin_java_set_imports(RBinJavaObj *bin) { case R_BIN_JAVA_CP_METHODREF: type = "METHOD"; break; case R_BIN_JAVA_CP_INTERFACEMETHOD_REF: type = "FIELD"; break; case R_BIN_JAVA_CP_FIELDREF: type = "INTERFACE_METHOD"; break; - default: break; + default: type = NULL; break; } if (type) { add_import (bin, obj, type); @@ -4448,16 +4507,15 @@ R_API RBinJavaStackMapFrame *r_bin_java_build_stack_frame_from_local_variable_ta case 'L': // TODO: FIXME write something that will iterate over the CP Pool and find the // CONSTANT_Class_info referencing this - { - ut16 idx = r_bin_java_find_cp_class_ref_from_name_idx (bin, lvattr->name_idx); - type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_OBJECT, idx); - } - break; + { + ut16 idx = r_bin_java_find_cp_class_ref_from_name_idx (bin, lvattr->name_idx); + type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_OBJECT, idx); + } + break; default: eprintf ("r_bin_java_build_stack_frame_from_local_variable_table: " "not sure how to handle: name: %s, type: %s\n", lvattr->name, lvattr->descriptor); type_item = r_bin_java_verification_info_from_type (bin, R_BIN_JAVA_STACKMAP_NULL, 0); - break; } if (type_item) { r_list_append (sf->local_items, (void *) type_item); @@ -4465,7 +4523,8 @@ R_API RBinJavaStackMapFrame *r_bin_java_build_stack_frame_from_local_variable_ta value_cnt++; } if (value_cnt != attr->info.local_variable_table_attr.table_length) { - IFDBG eprintf ("r_bin_java_build_stack_frame_from_local_variable_table: Number of locals not accurate. Expected %d but got %d", + IFDBG eprintf ("r_bin_java_build_stack_frame_from_local_variable_table: " + "Number of locals not accurate. Expected %d but got %d", attr->info.local_variable_table_attr.table_length, value_cnt); } return sf; @@ -4558,8 +4617,10 @@ R_API void r_bin_java_do_nothing_free(void /*RBinJavaCPTypeObj*/ *obj) { R_API RBinJavaCPTypeObj *r_bin_java_unknown_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; - RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj); + RBinJavaCPTypeObj *obj = NULL; + obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj)); if (obj) { + memset (obj, 0, sizeof (RBinJavaCPTypeObj)); obj->tag = tag; obj->metas = R_NEW0 (RBinJavaMetaInfo); obj->metas->type_info = (void *) &R_BIN_JAVA_CP_METAS[R_BIN_JAVA_CP_UNKNOWN]; @@ -4598,18 +4659,21 @@ R_API ut64 r_bin_java_class_cp_calc_size(RBinJavaCPTypeObj *obj) { R_API RBinJavaCPTypeObj *r_bin_java_fieldref_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; + RBinJavaCPTypeObj *obj = NULL; int quick_check = 0; quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_FIELDREF, tag, sz, "FieldRef"); if (quick_check > 0) { - return NULL; + return obj; } - RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj); + obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj)); if (obj) { + memset (obj, 0, sizeof (RBinJavaCPTypeObj)); obj->tag = tag; obj->metas = R_NEW0 (RBinJavaMetaInfo); obj->metas->type_info = (void *) &R_BIN_JAVA_CP_METAS[tag]; obj->info.cp_field.class_idx = R_BIN_JAVA_USHORT (buffer, 1); obj->info.cp_field.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3); + } return (RBinJavaCPTypeObj *) obj; } @@ -4627,13 +4691,15 @@ R_API ut64 r_bin_java_fieldref_cp_calc_size(RBinJavaCPTypeObj *obj) { R_API RBinJavaCPTypeObj *r_bin_java_methodref_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; + RBinJavaCPTypeObj *obj = NULL; int quick_check = 0; quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_METHODREF, tag, sz, "MethodRef"); if (quick_check > 0) { - return NULL; + return obj; } - RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj); + obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj)); if (obj) { + memset (obj, 0, sizeof (RBinJavaCPTypeObj)); obj->tag = tag; obj->metas = R_NEW0 (RBinJavaMetaInfo); obj->metas->type_info = (void *) &R_BIN_JAVA_CP_METAS[tag]; @@ -4668,6 +4734,7 @@ R_API RBinJavaCPTypeObj *r_bin_java_interfacemethodref_cp_new(RBinJavaObj *bin, obj->name = strdup ((const char *) R_BIN_JAVA_CP_METAS[tag].name); obj->info.cp_interface.class_idx = R_BIN_JAVA_USHORT (buffer, 1); obj->info.cp_interface.name_and_type_idx = R_BIN_JAVA_USHORT (buffer, 3); + } return obj; } @@ -4711,11 +4778,12 @@ R_API ut64 r_bin_java_string_cp_calc_size(RBinJavaCPTypeObj *obj) { R_API RBinJavaCPTypeObj *r_bin_java_integer_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; + RBinJavaCPTypeObj *obj = NULL; int quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_INTEGER, tag, sz, "Integer"); if (quick_check > 0) { - return NULL; + return obj; } - RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj); + obj = (RBinJavaCPTypeObj *) R_NEW0 (RBinJavaCPTypeObj); if (obj) { obj->tag = tag; obj->metas = R_NEW0 (RBinJavaMetaInfo); @@ -4739,11 +4807,12 @@ R_API ut64 r_bin_java_integer_cp_calc_size(RBinJavaCPTypeObj *obj) { R_API RBinJavaCPTypeObj *r_bin_java_float_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; + RBinJavaCPTypeObj *obj = NULL; int quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_FLOAT, tag, sz, "Float"); if (quick_check > 0) { - return NULL; + return obj; } - RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj); + obj = (RBinJavaCPTypeObj *) calloc (1, sizeof (RBinJavaCPTypeObj)); if (obj) { obj->tag = tag; obj->metas = R_NEW0 (RBinJavaMetaInfo); @@ -4766,18 +4835,21 @@ R_API ut64 r_bin_java_float_cp_calc_size(RBinJavaCPTypeObj *obj) { R_API RBinJavaCPTypeObj *r_bin_java_long_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; + RBinJavaCPTypeObj *obj = NULL; int quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_LONG, tag, sz, "Long"); if (quick_check > 0) { - return NULL; + return obj; } - RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj); + obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj)); if (obj) { + memset (obj, 0, sizeof (RBinJavaCPTypeObj)); obj->tag = tag; obj->metas = R_NEW0 (RBinJavaMetaInfo); obj->metas->type_info = (void *) &R_BIN_JAVA_CP_METAS[tag]; obj->name = strdup ((const char *) R_BIN_JAVA_CP_METAS[tag].name); memset (&obj->info.cp_long.bytes, 0, sizeof (obj->info.cp_long.bytes)); memcpy (&(obj->info.cp_long.bytes), buffer + 1, 8); + } return obj; } @@ -4793,12 +4865,14 @@ R_API ut64 r_bin_java_long_cp_calc_size(RBinJavaCPTypeObj *obj) { R_API RBinJavaCPTypeObj *r_bin_java_double_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; - const int quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_DOUBLE, tag, sz, "Double"); + RBinJavaCPTypeObj *obj = NULL; + int quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_DOUBLE, tag, sz, "Double"); if (quick_check > 0) { - return NULL; + return (RBinJavaCPTypeObj *) obj; } - RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTypeObj); + obj = (RBinJavaCPTypeObj *) malloc (sizeof (RBinJavaCPTypeObj)); if (obj) { + memset (obj, 0, sizeof (RBinJavaCPTypeObj)); obj->tag = tag; obj->metas = R_NEW0 (RBinJavaMetaInfo); obj->metas->type_info = (void *) &R_BIN_JAVA_CP_METAS[tag]; @@ -5136,12 +5210,13 @@ R_API ut8 *r_bin_java_cp_get_name_type(RBinJavaObj *bin, ut32 *out_sz, ut16 name R_API ut8 *r_bin_java_cp_get_utf8(ut8 tag, ut32 *out_sz, const ut8 *buf, const ut64 len) { ut8 *buffer = NULL; + ut16 sz = 0; ut16 t = (ut16) len; if (len > 0 && len > (ut16) - 1) { *out_sz = 0; return NULL; } - ut16 sz = R_BIN_JAVA_USHORT (((ut8 *) (ut16 *) &t), 0); + sz = R_BIN_JAVA_USHORT (((ut8 *) (ut16 *) &t), 0); *out_sz = 3 + t; // tag + sz + bytes buffer = malloc (*out_sz + 3); if (!buffer) { @@ -5536,7 +5611,7 @@ R_API void r_bin_java_print_stack_map_frame_summary(RBinJavaStackMapFrame *obj) R_API void r_bin_java_print_verification_info_summary(RBinJavaVerificationObj *obj) { ut8 tag_value = R_BIN_JAVA_STACKMAP_UNKNOWN; if (!obj) { - R_LOG_WARN ("Attempting to print an invalid RBinJavaVerificationObj*"); + eprintf ("Attempting to print an invalid RBinJavaVerificationObj* .\n"); return; } if (obj->tag < R_BIN_JAVA_STACKMAP_UNKNOWN) { @@ -5560,6 +5635,9 @@ R_API void r_bin_java_print_field_summary(RBinJavaField *field) { if (field->type == R_BIN_JAVA_FIELD_TYPE_METHOD) { r_bin_java_print_method_summary (field); } else { +#if 0 + r_bin_java_print_interface_summary (field); +#else printf ("Field Summary Information:\n"); printf (" File Offset: 0x%08"PFMT64x "\n", field->file_offset); printf (" Name Index: %d (%s)\n", field->name_idx, field->name); @@ -5570,9 +5648,10 @@ R_API void r_bin_java_print_field_summary(RBinJavaField *field) { r_list_foreach_safe (field->attributes, iter, iter_tmp, attr) { r_bin_java_print_attr_summary (attr); } +#endif } } else { - R_LOG_WARN ("Attempting to print an invalid RBinJavaField* Field"); + eprintf ("Attempting to print an invalid RBinJavaField* Field.\n"); } } @@ -5594,32 +5673,30 @@ R_API void r_bin_java_print_method_summary(RBinJavaField *field) { r_bin_java_print_attr_summary (attr); } } - -#if 0 -R_API void r_bin_java_print_interface_summary(ut16 idx) {//RBinJavaField *field) { - RBinJavaAttrInfo *attr; - RBinJavaCPTypeObj *class_info; - RListIter *iter, *iter_tmp; - if (field == NULL) { - eprintf ("Attempting to print an invalid RBinJavaField* Interface.\n"); - return; - } - eprintf ("Interface Summary Information:\n"); - eprintf (" File offset: 0x%08"PFMT64x"", field->file_offset); - eprintf (" Access Flags: %d\n", field->flags); - eprintf (" Name Index: %d (%s)\n", field->name_idx, field->name); - eprintf (" Descriptor Index: %d (%s)\n", field->descriptor_idx, field->descriptor); - eprintf (" Interface Attributes Count: %d\n", field->attr_count); - eprintf (" Interface Attributes:\n"); - r_list_foreach_safe (field->attributes, iter, iter_tmp, attr) { - r_bin_java_print_attr_summary(attr); - } -} -#endif - +/* + R_API void r_bin_java_print_interface_summary(ut16 idx) {//RBinJavaField *field) { + RBinJavaAttrInfo *attr; + RBinJavaCPTypeObj *class_info; + RListIter *iter, *iter_tmp; + if (field == NULL) { + eprintf ("Attempting to print an invalid RBinJavaField* Interface.\n"); + return; + } + eprintf ("Interface Summary Information:\n"); + eprintf (" File offset: 0x%08"PFMT64x"", field->file_offset); + eprintf (" Access Flags: %d\n", field->flags); + eprintf (" Name Index: %d (%s)\n", field->name_idx, field->name); + eprintf (" Descriptor Index: %d (%s)\n", field->descriptor_idx, field->descriptor); + eprintf (" Interface Attributes Count: %d\n", field->attr_count); + eprintf (" Interface Attributes:\n"); + r_list_foreach_safe (field->attributes, iter, iter_tmp, attr) { + r_bin_java_print_attr_summary(attr); + } + } + */ R_API void r_bin_java_print_interfacemethodref_cp_summary(RBinJavaCPTypeObj *obj) { if (!obj) { - R_LOG_ERROR ("Attempting to print an invalid RBinJavaCPTypeObj* InterfaceMethodRef"); + eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* InterfaceMethodRef.\n"); return; } eprintf ("InterfaceMethodRef ConstantPool Type (%d) ", obj->metas->ord); @@ -5635,11 +5712,12 @@ R_API char *r_bin_java_print_interfacemethodref_cp_stringify(RBinJavaCPTypeObj * } R_API void r_bin_java_print_methodhandle_cp_summary(RBinJavaCPTypeObj *obj) { + ut8 ref_kind; if (!obj) { - R_LOG_ERROR ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeMethodHandle"); + eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeMethodHandle.\n"); return; } - ut8 ref_kind = obj->info.cp_method_handle.reference_kind; + ref_kind = obj->info.cp_method_handle.reference_kind; eprintf ("MethodHandle ConstantPool Type (%d) ", obj->metas->ord); eprintf (" Offset: 0x%08"PFMT64x"", obj->file_offset); eprintf (" Reference Kind = (0x%02x) %s\n", ref_kind, R_BIN_JAVA_REF_METAS[ref_kind].name); @@ -5655,7 +5733,7 @@ R_API char *r_bin_java_print_methodhandle_cp_stringify(RBinJavaCPTypeObj *obj) { R_API void r_bin_java_print_methodtype_cp_summary(RBinJavaCPTypeObj *obj) { if (!obj) { - R_LOG_ERROR ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeMethodType"); + eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeMethodType.\n"); return; } printf ("MethodType ConstantPool Type (%d) ", obj->metas->ord); @@ -5671,7 +5749,7 @@ R_API char *r_bin_java_print_methodtype_cp_stringify(RBinJavaCPTypeObj *obj) { R_API void r_bin_java_print_invokedynamic_cp_summary(RBinJavaCPTypeObj *obj) { if (!obj) { - R_LOG_ERROR ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeInvokeDynamic"); + eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeInvokeDynamic.\n"); return; } eprintf ("InvokeDynamic ConstantPool Type (%d) ", obj->metas->ord); @@ -5717,10 +5795,28 @@ R_API void r_bin_java_print_fieldref_cp_summary(RBinJavaCPTypeObj *obj) { } R_API char *r_bin_java_print_fieldref_cp_stringify(RBinJavaCPTypeObj *obj) { - return r_str_newf ("%d.0x%04"PFMT64x ".%s.%d.%d", + ut32 size = 255, consumed = 0; + char *value = malloc (size); + if (value) { + memset (value, 0, size); + consumed = snprintf (value, size, "%d.0x%04"PFMT64x ".%s.%d.%d", obj->metas->ord, obj->file_offset + obj->loadaddr, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name, obj->info.cp_field.class_idx, obj->info.cp_field.name_and_type_idx); + if (consumed >= size - 1) { + free (value); + size += size >> 1; + value = malloc (size); + if (value) { + memset (value, 0, size); + (void)snprintf (value, size, "%d.0x%04"PFMT64x ".%s.%d.%d", + obj->metas->ord, obj->file_offset + obj->loadaddr, ((RBinJavaCPTypeMetas *) obj->metas->type_info)->name, + obj->info.cp_field.class_idx, + obj->info.cp_field.name_and_type_idx); + } + } + } + return value; } R_API void r_bin_java_print_classref_cp_summary(RBinJavaCPTypeObj *obj) { diff --git a/shlr/java/class.h b/shlr/java/class.h index 636a4b5ebf..ed584ba89d 100644 --- a/shlr/java/class.h +++ b/shlr/java/class.h @@ -1,4 +1,6 @@ -/* radare - Apache 2.0 - Copyright 2007-2023 - pancake, dso */ +/* radare - Apache 2.0 - Copyright 2007-2017 - pancake + class.h rewrite: Adam Pridgen + */ #ifndef _INCLUDE_JAVA_CLASS_H_ #define _INCLUDE_JAVA_CLASS_H_ @@ -36,7 +38,6 @@ static inline ut32 UINT(const ut8 *x, const int y) { #define R_BIN_JAVA_USHORT(x,y) ((ut16)(((0xff&x[y+1])|((x[y]&0xff)<<8)) & 0xffff)) -// TODO: use r_read APIs instead! #define R_BIN_JAVA_UINT(x,y) ((ut32)((((ut32)(x[y]&0xff))<<24)|(((ut32)(x[y+1]&0xff))<<16)|((ut32)((x[y+2]&0xff))<<8)|(x[y+3]&0xff))) #define R_BIN_JAVA_FLOAT(x,y) ((float)R_BIN_JAVA_UINT(x,y)) @@ -44,10 +45,12 @@ static inline ut32 UINT(const ut8 *x, const int y) { //#define R_BIN_JAVA_DOUBLE(x,y) ((double)RBIN_JAVA_LONG(x,y)) //#define R_BIN_JAVA_SWAPUSHORT(x) ((ut16)((x<<8)|((x>>8)&0x00FF))) + + #define R_BIN_JAVA_DOUBLE(x,y) rbin_java_raw_to_double(x, y) typedef enum { - R_BIN_JAVA_METHOD_ACC_PUBLIC = 0x0001, + R_BIN_JAVA_METHOD_ACC_PUBLIC= 0x0001, R_BIN_JAVA_METHOD_ACC_PRIVATE = 0x0002, R_BIN_JAVA_METHOD_ACC_PROTECTED = 0x0004, R_BIN_JAVA_METHOD_ACC_STATIC = 0x0008, @@ -68,7 +71,7 @@ typedef enum { } R_BIN_JAVA_METHOD_ACCESS; typedef enum { - R_BIN_JAVA_FIELD_ACC_PUBLIC = 0x0001, + R_BIN_JAVA_FIELD_ACC_PUBLIC= 0x0001, R_BIN_JAVA_FIELD_ACC_PRIVATE = 0x0002, R_BIN_JAVA_FIELD_ACC_PROTECTED = 0x0004, R_BIN_JAVA_FIELD_ACC_STATIC = 0x0008, @@ -82,7 +85,7 @@ typedef enum { } R_BIN_JAVA_FIELD_ACCESS; typedef enum { - R_BIN_JAVA_CLASS_ACC_PUBLIC = 0x0001, + R_BIN_JAVA_CLASS_ACC_PUBLIC= 0x0001, R_BIN_JAVA_CLASS_ACC_PRIVATE = 0x0002, R_BIN_JAVA_CLASS_ACC_PROTECTED = 0x0004, R_BIN_JAVA_CLASS_ACC_STATIC = 0x0008, @@ -95,7 +98,7 @@ typedef enum { R_BIN_JAVA_CLASS_ACC_NATIVE = 0x0100, R_BIN_JAVA_CLASS_ACC_INTERFACE = 0x0200, R_BIN_JAVA_CLASS_ACC_ABSTRACT = 0x0400, - R_BIN_JAVA_CLASS_ACC_STRICT = 0x0800, + R_BIN_JAVA_CLASS_ACC_STRICT= 0x0800, R_BIN_JAVA_CLASS_ACC_SYNTHETIC = 0x1000, R_BIN_JAVA_CLASS_ACC_ANNOTATION = 0x2000, @@ -222,6 +225,7 @@ typedef struct r_bin_java_methodref_info_t { ut16 name_and_type_idx; } RBinJavaCPTypeMethodRef; + typedef struct r_bin_java_interfacemethodref_info_t { ut16 class_idx; ut16 name_and_type_idx; @@ -262,6 +266,7 @@ typedef struct r_bin_java_float_info_t { } bytes; } RBinJavaCPTypeFloat; + typedef struct r_bin_java_long_info_t { union { ut8 raw[8]; @@ -283,6 +288,7 @@ typedef struct r_bin_java_double_info_t { } bytes; } RBinJavaCPTypeDouble; + /* Meta-data Info */ typedef struct r_bin_java_name_and_type_info_t { @@ -402,6 +408,8 @@ typedef struct r_bin_java_element_value_ary_t{ RList *values; } RBinJavaElementValueArray; + + typedef struct r_bin_java_annotation_t{ ut64 size; ut16 type_idx; @@ -451,6 +459,8 @@ typedef struct r_bin_java_element_value_pair_t{ RBinJavaElementValue *value; } RBinJavaElementValuePair; + + typedef struct r_bin_java_annotations_attr_t { ut64 size; ut16 num_annotations; @@ -479,6 +489,7 @@ typedef struct r_bin_java_stack_map_table_attr_t { // attribute StackMap RList* stack_map_frame_entries; } RBinJavaStackMapTableAttr; + typedef struct r_bin_java_signature_attr_t { ut16 signature_idx; char *signature; @@ -611,6 +622,7 @@ typedef struct r_bin_java_attr_localvariable_t{ ut64 size; } RBinJavaLocalVariableAttribute; + typedef struct r_bin_java_attr_localvariable_table_t { ut16 table_length; RList* local_variable_table; // RBinJavaLocalVariable @@ -885,6 +897,8 @@ R_API char* r_bin_java_get_desc_from_cp_item_list(RList *cp_list, ut64 idx); R_API char* r_bin_java_get_item_name_from_cp_item_list(RList *cp_list, RBinJavaCPTypeObj *obj, int depth); R_API char* r_bin_java_get_item_desc_from_cp_item_list(RList *cp_list, RBinJavaCPTypeObj *obj, int depth); + + R_API char* r_bin_java_get_name_from_bin_cp_list(RBinJavaObj *bin, ut64 idx); R_API char* r_bin_java_get_utf8_from_bin_cp_list(RBinJavaObj *bin, ut64 idx); R_API ut32 r_bin_java_get_utf8_len_from_bin_cp_list(RBinJavaObj *bin, ut64 idx); @@ -964,11 +978,9 @@ R_API ut16 U(r_bin_java_calculate_class_access_value)(const char * access_flags_ R_API RList * U(retrieve_all_method_access_string_and_value)(void); R_API RList * U(retrieve_all_field_access_string_and_value)(void); R_API RList * U(retrieve_all_class_access_string_and_value)(void); -#if 0 R_API char * retrieve_method_access_string(ut16 flags); R_API char * retrieve_field_access_string(ut16 flags); R_API char * retrieve_class_method_access_string(ut16 flags); -#endif R_API char * U(r_bin_java_resolve)(RBinJavaObj *obj, int idx, ut8 space_bn_name_type); R_API char * r_bin_java_resolve_with_space(RBinJavaObj *obj, int idx); @@ -1043,7 +1055,7 @@ R_API void r_bin_java_get_method_json_definitions(RBinJavaObj *bin, PJ *pj); R_API void r_bin_java_get_import_json_definitions(RBinJavaObj *bin, PJ *pj); R_API void r_bin_java_get_interface_json_definitions(RBinJavaObj *bin, PJ *pj); -R_API void r_bin_java_get_fm_type_definition_json(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj, bool is_method); +R_API void r_bin_java_get_fm_type_definition_json(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj, int is_method); R_API void r_bin_java_get_field_json_definition(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj); R_API void r_bin_java_get_method_json_definition(RBinJavaObj *bin, RBinJavaField *fm_type, PJ *pj); R_API void r_bin_java_get_class_info_json(RBinJavaObj *bin, PJ *pj); @@ -1051,9 +1063,4 @@ R_API void r_bin_java_get_class_info_json(RBinJavaObj *bin, PJ *pj); R_API char *r_bin_java_get_bin_obj_json(RBinJavaObj *bin); R_API ut64 r_bin_java_calc_class_size(ut8* bytes, ut64 size); R_API int r_bin_java_valid_class(const ut8 * buf, ut64 buf_sz); - -R_API char *retrieve_class_method_access_string(ut16 flags); -R_API char *retrieve_method_access_string(ut16 flags); -R_API char *retrieve_field_access_string(ut16 flags); -R_API char *retrieve_class_method_access_string(ut16 flags); #endif diff --git a/test/db/cmd/cmd_tc b/test/db/cmd/cmd_tc index 7906b0bddb..1846596ba1 100644 --- a/test/db/cmd/cmd_tc +++ b/test/db/cmd/cmd_tc @@ -62,7 +62,7 @@ fs classes "f method.Employee.setFirstName: = 0x100001cb0" "f method.Employee.shortWord = 0x100001cf0" "f method.Employee.wideWord = 0x100001d10" -"f method.Employee.class.sayHello = 0x100001be0" +"f method.class.Employee.sayHello = 0x100001be0" "f field.Employee.var.isa = 0x00000000" "f field.Employee.var._shortWord = 0x100003328" "f field.Employee.var._username = 0x100003330" @@ -312,7 +312,7 @@ fs classes "f method.Employee.shortWord = 0x100007b24" "f method.Employee.wideWord = 0x100007b44" "f method.Employee..cxx_destruct = 0x100007b60" -"f method.Employee.class.sayHello = 0x100007958" +"f method.class.Employee.sayHello = 0x100007958" "f field.Employee.var.isa = 0x00000000" "f field.Employee.var._shortWord = 0x10000c228" "f field.Employee.var._username = 0x10000c22c" @@ -564,7 +564,7 @@ fs classes "f method.Employee.shortWord = 0x100007b88" "f method.Employee.wideWord = 0x100007ba8" "f method.Employee..cxx_destruct = 0x100007bc4" -"f method.Employee.class.sayHello = 0x1000079a8" +"f method.class.Employee.sayHello = 0x1000079a8" "f field.Employee.var.isa = 0x00000000" "f field.Employee.var._shortWord = 0x10000c1d8" "f field.Employee.var._username = 0x10000c1dc" diff --git a/test/db/formats/dex b/test/db/formats/dex index bb5c4f0b8e..2aa6293266 100644 --- a/test/db/formats/dex +++ b/test/db/formats/dex @@ -78,7 +78,7 @@ CMDS=ic EXPECT=<(Ljava/lang/String;)V -0x000001c0 java method 1 ps LHello.method.main([Ljava/lang/String;)V +0x000001c0 java method 1 sp LHello.method.main([Ljava/lang/String;)V 0x000001e8 java method 2 p LHello.method.say()V 0x00000124 java var 0 P LHello.ifield_who:Ljava/lang/String EOF @@ -90,7 +90,7 @@ CMDS=ic LHello EXPECT=<(Ljava/lang/String;)V -0x000001c0 method LHello ps LHello.method.main([Ljava/lang/String;)V +0x000001c0 method LHello sp LHello.method.main([Ljava/lang/String;)V 0x000001e8 method LHello p LHello.method.say()V EOF RUN @@ -110,7 +110,7 @@ icj~{[0].methods[1].flags[0]} icj~{[0].methods[1].flags[1]} EOF EXPECT=<(Ljava/io/InputStream;)V 0x0000c6dc java method 1 pC Lcom/ice/tar/FastTarStream.method.(Ljava/io/InputStream;I)V -0x0000c720 java method 2 ps Lcom/ice/tar/FastTarStream.method.main([Ljava/lang/String;)V +0x0000c720 java method 2 sp Lcom/ice/tar/FastTarStream.method.main([Ljava/lang/String;)V 0x0000ca5c java method 3 p Lcom/ice/tar/FastTarStream.method.getNextEntry()Lcom/ice/tar/TarEntry; 0x0000cd28 java method 4 p Lcom/ice/tar/FastTarStream.method.setDebug(Z)V 0x00003f20 java var 0 P Lcom/ice/tar/FastTarStream.ifield_currEntry:Lcom/ice/tar/TarEntry @@ -599,8 +599,8 @@ EXPECT=<()V -0x0000f43c java method 1 ps Lcom/ice/tar/TarHeader.method.getCheckSumOctalBytes(J[BII)I -0x0000f478 java method 2 ps Lcom/ice/tar/TarHeader.method.getFileNameBytes(Ljava/lang/String;[B)I -0x0000f558 java method 3 ps Lcom/ice/tar/TarHeader.method.getLongOctalBytes(J[BII)I -0x0000f588 java method 4 ps Lcom/ice/tar/TarHeader.method.getNameBytes(Ljava/lang/StringBuffer;[BII)I -0x0000f5dc java method 5 ps Lcom/ice/tar/TarHeader.method.getOctalBytes(J[BII)I -0x0000f680 java method 6 ps Lcom/ice/tar/TarHeader.method.parseFileName([B)Ljava/lang/StringBuffer; -0x0000f700 java method 7 ps Lcom/ice/tar/TarHeader.method.parseName([BII)Ljava/lang/StringBuffer; -0x0000f740 java method 8 ps Lcom/ice/tar/TarHeader.method.parseOctal([BII)J +0x0000f43c java method 1 sp Lcom/ice/tar/TarHeader.method.getCheckSumOctalBytes(J[BII)I +0x0000f478 java method 2 sp Lcom/ice/tar/TarHeader.method.getFileNameBytes(Ljava/lang/String;[B)I +0x0000f558 java method 3 sp Lcom/ice/tar/TarHeader.method.getLongOctalBytes(J[BII)I +0x0000f588 java method 4 sp Lcom/ice/tar/TarHeader.method.getNameBytes(Ljava/lang/StringBuffer;[BII)I +0x0000f5dc java method 5 sp Lcom/ice/tar/TarHeader.method.getOctalBytes(J[BII)I +0x0000f680 java method 6 sp Lcom/ice/tar/TarHeader.method.parseFileName([B)Ljava/lang/StringBuffer; +0x0000f700 java method 7 sp Lcom/ice/tar/TarHeader.method.parseName([BII)Ljava/lang/StringBuffer; +0x0000f740 java method 8 sp Lcom/ice/tar/TarHeader.method.parseOctal([BII)J 0x0000f7ac java method 9 p Lcom/ice/tar/TarHeader.method.clone()Ljava/lang/Object; 0x0000f900 java method 10 p Lcom/ice/tar/TarHeader.method.getName()Ljava/lang/String; -0x00004088 java var 0 psf Lcom/ice/tar/TarHeader.sfield_CHKSUMLEN:I -0x00004090 java var 1 psf Lcom/ice/tar/TarHeader.sfield_DEVLEN:I -0x00004098 java var 2 psf Lcom/ice/tar/TarHeader.sfield_GIDLEN:I -0x000040a0 java var 3 psf Lcom/ice/tar/TarHeader.sfield_GNAMELEN:I -0x000040a8 java var 4 psf Lcom/ice/tar/TarHeader.sfield_GNU_TMAGIC:Ljava/lang/String -0x000040b0 java var 5 psf Lcom/ice/tar/TarHeader.sfield_LF_BLK:B -0x000040b8 java var 6 psf Lcom/ice/tar/TarHeader.sfield_LF_CHR:B -0x000040c0 java var 7 psf Lcom/ice/tar/TarHeader.sfield_LF_CONTIG:B -0x000040c8 java var 8 psf Lcom/ice/tar/TarHeader.sfield_LF_DIR:B -0x000040d0 java var 9 psf Lcom/ice/tar/TarHeader.sfield_LF_FIFO:B -0x000040d8 java var 10 psf Lcom/ice/tar/TarHeader.sfield_LF_LINK:B -0x000040e0 java var 11 psf Lcom/ice/tar/TarHeader.sfield_LF_NORMAL:B -0x000040e8 java var 12 psf Lcom/ice/tar/TarHeader.sfield_LF_OLDNORM:B -0x000040f0 java var 13 psf Lcom/ice/tar/TarHeader.sfield_LF_SYMLINK:B -0x000040f8 java var 14 psf Lcom/ice/tar/TarHeader.sfield_MAGICLEN:I -0x00004100 java var 15 psf Lcom/ice/tar/TarHeader.sfield_MODELEN:I -0x00004108 java var 16 psf Lcom/ice/tar/TarHeader.sfield_MODTIMELEN:I -0x00004110 java var 17 psf Lcom/ice/tar/TarHeader.sfield_NAMELEN:I -0x00004118 java var 18 psf Lcom/ice/tar/TarHeader.sfield_NAMEOFFSET:I -0x00004120 java var 19 psf Lcom/ice/tar/TarHeader.sfield_PREFIXLEN:I -0x00004128 java var 20 psf Lcom/ice/tar/TarHeader.sfield_PREFIXOFFSET:I -0x00004130 java var 21 psf Lcom/ice/tar/TarHeader.sfield_SIZELEN:I -0x00004138 java var 22 psf Lcom/ice/tar/TarHeader.sfield_TMAGIC:Ljava/lang/String -0x00004140 java var 23 psf Lcom/ice/tar/TarHeader.sfield_UIDLEN:I -0x00004148 java var 24 psf Lcom/ice/tar/TarHeader.sfield_UNAMELEN:I +0x00004088 java var 0 spf Lcom/ice/tar/TarHeader.sfield_CHKSUMLEN:I +0x00004090 java var 1 spf Lcom/ice/tar/TarHeader.sfield_DEVLEN:I +0x00004098 java var 2 spf Lcom/ice/tar/TarHeader.sfield_GIDLEN:I +0x000040a0 java var 3 spf Lcom/ice/tar/TarHeader.sfield_GNAMELEN:I +0x000040a8 java var 4 spf Lcom/ice/tar/TarHeader.sfield_GNU_TMAGIC:Ljava/lang/String +0x000040b0 java var 5 spf Lcom/ice/tar/TarHeader.sfield_LF_BLK:B +0x000040b8 java var 6 spf Lcom/ice/tar/TarHeader.sfield_LF_CHR:B +0x000040c0 java var 7 spf Lcom/ice/tar/TarHeader.sfield_LF_CONTIG:B +0x000040c8 java var 8 spf Lcom/ice/tar/TarHeader.sfield_LF_DIR:B +0x000040d0 java var 9 spf Lcom/ice/tar/TarHeader.sfield_LF_FIFO:B +0x000040d8 java var 10 spf Lcom/ice/tar/TarHeader.sfield_LF_LINK:B +0x000040e0 java var 11 spf Lcom/ice/tar/TarHeader.sfield_LF_NORMAL:B +0x000040e8 java var 12 spf Lcom/ice/tar/TarHeader.sfield_LF_OLDNORM:B +0x000040f0 java var 13 spf Lcom/ice/tar/TarHeader.sfield_LF_SYMLINK:B +0x000040f8 java var 14 spf Lcom/ice/tar/TarHeader.sfield_MAGICLEN:I +0x00004100 java var 15 spf Lcom/ice/tar/TarHeader.sfield_MODELEN:I +0x00004108 java var 16 spf Lcom/ice/tar/TarHeader.sfield_MODTIMELEN:I +0x00004110 java var 17 spf Lcom/ice/tar/TarHeader.sfield_NAMELEN:I +0x00004118 java var 18 spf Lcom/ice/tar/TarHeader.sfield_NAMEOFFSET:I +0x00004120 java var 19 spf Lcom/ice/tar/TarHeader.sfield_PREFIXLEN:I +0x00004128 java var 20 spf Lcom/ice/tar/TarHeader.sfield_PREFIXOFFSET:I +0x00004130 java var 21 spf Lcom/ice/tar/TarHeader.sfield_SIZELEN:I +0x00004138 java var 22 spf Lcom/ice/tar/TarHeader.sfield_TMAGIC:Ljava/lang/String +0x00004140 java var 23 spf Lcom/ice/tar/TarHeader.sfield_UIDLEN:I +0x00004148 java var 24 spf Lcom/ice/tar/TarHeader.sfield_UNAMELEN:I 0x00004150 java var 25 p Lcom/ice/tar/TarHeader.ifield_checkSum:I 0x00004158 java var 26 p Lcom/ice/tar/TarHeader.ifield_devMajor:I 0x00004160 java var 27 p Lcom/ice/tar/TarHeader.ifield_devMinor:I @@ -782,10 +782,10 @@ EXPECT=<()V -0x000042c8 java var 0 psf Lcom/stericson/RootTools/BuildConfig.sfield_DEBUG:Z +0x000042c8 java var 0 spf Lcom/stericson/RootTools/BuildConfig.sfield_DEBUG:Z 0x00007a30 [0x0000a41b - 0x000107c0] 25509 java class 13 Lcom/stericson/RootTools/Command :: Ljava/lang/Object; -0x000104ac java method 0 pCg Lcom/stericson/RootTools/Command.method.(II[Ljava/lang/String;)V -0x000104e4 java method 1 pCg Lcom/stericson/RootTools/Command.method.(I[Ljava/lang/String;)V +0x000104ac java method 0 pgC Lcom/stericson/RootTools/Command.method.(II[Ljava/lang/String;)V +0x000104e4 java method 1 pgC Lcom/stericson/RootTools/Command.method.(I[Ljava/lang/String;)V 0x00010518 java method 2 p Lcom/stericson/RootTools/Command.method.commandFinished(I)V 0x0001055c java method 3 p Lcom/stericson/RootTools/Command.method.exitCode()I 0x00010590 java method 4 p Lcom/stericson/RootTools/Command.method.exitCode(I)I @@ -833,34 +833,34 @@ EXPECT=<(Landroid/content/Context;)V 0x00011440 java method 1 r Lcom/stericson/RootTools/Installer.method.installBinary(ILjava/lang/String;Ljava/lang/String;)Z 0x00011814 java method 2 r Lcom/stericson/RootTools/Installer.method.isBinaryInstalled(Ljava/lang/String;)Z -0x00004340 java var 0 Psf Lcom/stericson/RootTools/Installer.sfield_BOGUS_FILE_NAME:Ljava/lang/String -0x00004348 java var 1 Psf Lcom/stericson/RootTools/Installer.sfield_LOG_TAG:Ljava/lang/String +0x00004340 java var 0 sPf Lcom/stericson/RootTools/Installer.sfield_BOGUS_FILE_NAME:Ljava/lang/String +0x00004348 java var 1 sPf Lcom/stericson/RootTools/Installer.sfield_LOG_TAG:Ljava/lang/String 0x00004350 java var 2 P Lcom/stericson/RootTools/Installer.ifield_context:Landroid/content/Context 0x00004358 java var 3 P Lcom/stericson/RootTools/Installer.ifield_filesPath:Ljava/lang/String 0x00007ad0 [0x00011874 - 0x0001399c] 8488 java class 18 Lcom/stericson/RootTools/InternalMethods :: Ljava/lang/Object; 0x00011874 java method 0 C Lcom/stericson/RootTools/InternalMethods.method.()V 0x0001188c java method 1 s Lcom/stericson/RootTools/InternalMethods.method.checkUtil(Ljava/lang/String;)Z -0x000119c8 java method 2 ps Lcom/stericson/RootTools/InternalMethods.method.copyFile(Ljava/lang/String;Ljava/lang/String;ZZ)Z -0x00011cf0 java method 3 ps Lcom/stericson/RootTools/InternalMethods.method.exists(Ljava/lang/String;)Z +0x000119c8 java method 2 sp Lcom/stericson/RootTools/InternalMethods.method.copyFile(Ljava/lang/String;Ljava/lang/String;ZZ)Z +0x00011cf0 java method 3 sp Lcom/stericson/RootTools/InternalMethods.method.exists(Ljava/lang/String;)Z 0x00011e5c java method 4 s Lcom/stericson/RootTools/InternalMethods.method.findBinary(Ljava/lang/String;)Z -0x00012188 java method 5 ps Lcom/stericson/RootTools/InternalMethods.method.fixUtil(Ljava/lang/String;Ljava/lang/String;)V +0x00012188 java method 5 sp Lcom/stericson/RootTools/InternalMethods.method.fixUtil(Ljava/lang/String;Ljava/lang/String;)V 0x00012324 java method 6 s Lcom/stericson/RootTools/InternalMethods.method.fixUtils([Ljava/lang/String;)Z 0x000123b0 java method 7 s Lcom/stericson/RootTools/InternalMethods.method.getBusyBoxApplets(Ljava/lang/String;)Ljava/util/List; 0x0001245c java method 8 s Lcom/stericson/RootTools/InternalMethods.method.getBusyBoxVersion(Ljava/lang/String;)Ljava/lang/String; 0x00012540 java method 9 s Lcom/stericson/RootTools/InternalMethods.method.getFilePermissionsSymlinks(Ljava/lang/String;)Lcom/stericson/RootTools/Permissions; 0x00012690 java method 10 s Lcom/stericson/RootTools/InternalMethods.method.getInode(Ljava/lang/String;)Ljava/lang/String; 0x0001270c java method 11 s Lcom/stericson/RootTools/InternalMethods.method.getMountedAs(Ljava/lang/String;)Ljava/lang/String; -0x000127c4 java method 12 rs Lcom/stericson/RootTools/InternalMethods.method.getMounts()Ljava/util/ArrayList; +0x000127c4 java method 12 sr Lcom/stericson/RootTools/InternalMethods.method.getMounts()Ljava/util/ArrayList; 0x00012874 java method 13 s Lcom/stericson/RootTools/InternalMethods.method.getPath()Ljava/util/Set; 0x000128bc java method 14 s Lcom/stericson/RootTools/InternalMethods.method.getSpace(Ljava/lang/String;)J 0x00012a3c java method 15 s Lcom/stericson/RootTools/InternalMethods.method.getSymlink(Ljava/lang/String;)Ljava/lang/String; 0x00012bf0 java method 16 s Lcom/stericson/RootTools/InternalMethods.method.getSymlinks(Ljava/lang/String;)Ljava/util/ArrayList; 0x00012ca0 java method 17 s Lcom/stericson/RootTools/InternalMethods.method.getWorkingToolbox()Ljava/lang/String; -0x00012ce4 java method 18 ps Lcom/stericson/RootTools/InternalMethods.method.hasEnoughSpaceOnSdCard(J)Z -0x00012d58 java method 19 ps Lcom/stericson/RootTools/InternalMethods.method.hasUtil(Ljava/lang/String;Ljava/lang/String;)Z +0x00012ce4 java method 18 sp Lcom/stericson/RootTools/InternalMethods.method.hasEnoughSpaceOnSdCard(J)Z +0x00012d58 java method 19 sp Lcom/stericson/RootTools/InternalMethods.method.hasUtil(Ljava/lang/String;Ljava/lang/String;)Z 0x00012ec0 java method 20 s Lcom/stericson/RootTools/InternalMethods.method.installBinary(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)Z 0x00012f08 java method 21 s Lcom/stericson/RootTools/InternalMethods.method.isAccessGiven()Z -0x00012fa4 java method 22 ps Lcom/stericson/RootTools/InternalMethods.method.isAppletAvailable(Ljava/lang/String;Ljava/lang/String;)Z +0x00012fa4 java method 22 sp Lcom/stericson/RootTools/InternalMethods.method.isAppletAvailable(Ljava/lang/String;Ljava/lang/String;)Z 0x00013014 java method 23 s Lcom/stericson/RootTools/InternalMethods.method.isNativeToolsReady(ILandroid/content/Context;)Z 0x00013094 java method 24 s Lcom/stericson/RootTools/InternalMethods.method.isProcessRunning(Ljava/lang/String;)Z 0x0001312c java method 25 s Lcom/stericson/RootTools/InternalMethods.method.killProcess(Ljava/lang/String;)Z @@ -877,29 +877,29 @@ EXPECT=<()V 0x00013a54 java method 1 C Lcom/stericson/RootTools/InternalVariables.method.()V -0x000043a0 java var 0 rs Lcom/stericson/RootTools/InternalVariables.sfield_BBA:I -0x000043a8 java var 1 rs Lcom/stericson/RootTools/InternalVariables.sfield_BBV:I -0x000043b0 java var 2 rs Lcom/stericson/RootTools/InternalVariables.sfield_FPS:I -0x000043b8 java var 3 rs Lcom/stericson/RootTools/InternalVariables.sfield_GI:I -0x000043c0 java var 4 rs Lcom/stericson/RootTools/InternalVariables.sfield_GS:I -0x000043c8 java var 5 rs Lcom/stericson/RootTools/InternalVariables.sfield_GSYM:I -0x000043d0 java var 6 rs Lcom/stericson/RootTools/InternalVariables.sfield_IAG:I -0x000043d8 java var 7 rsf Lcom/stericson/RootTools/InternalVariables.sfield_PS_REGEX:Ljava/lang/String -0x000043e0 java var 8 rs Lcom/stericson/RootTools/InternalVariables.sfield_TAG:Ljava/lang/String -0x000043e8 java var 9 rs Lcom/stericson/RootTools/InternalVariables.sfield_accessGiven:Z -0x000043f0 java var 10 rs Lcom/stericson/RootTools/InternalVariables.sfield_busyboxVersion:Ljava/lang/String -0x000043f8 java var 11 rs Lcom/stericson/RootTools/InternalVariables.sfield_found:Z -0x00004400 java var 12 rs Lcom/stericson/RootTools/InternalVariables.sfield_getSpaceFor:Ljava/lang/String -0x00004408 java var 13 rs Lcom/stericson/RootTools/InternalVariables.sfield_inode:Ljava/lang/String -0x00004410 java var 14 rs Lcom/stericson/RootTools/InternalVariables.sfield_mounts:Ljava/util/ArrayList -0x00004418 java var 15 rs Lcom/stericson/RootTools/InternalVariables.sfield_nativeToolsReady:Z -0x00004420 java var 16 rs Lcom/stericson/RootTools/InternalVariables.sfield_path:Ljava/util/Set -0x00004428 java var 17 rs Lcom/stericson/RootTools/InternalVariables.sfield_permissions:Lcom/stericson/RootTools/Permissions -0x00004430 java var 18 rs Lcom/stericson/RootTools/InternalVariables.sfield_psPattern:Ljava/util/regex/Pattern -0x00004438 java var 19 rs Lcom/stericson/RootTools/InternalVariables.sfield_results:Ljava/util/List -0x00004440 java var 20 rs Lcom/stericson/RootTools/InternalVariables.sfield_space:[Ljava/lang/String -0x00004448 java var 21 rs Lcom/stericson/RootTools/InternalVariables.sfield_symlinks:Ljava/util/ArrayList -0x00004450 java var 22 rs Lcom/stericson/RootTools/InternalVariables.sfield_timeout:I +0x000043a0 java var 0 sr Lcom/stericson/RootTools/InternalVariables.sfield_BBA:I +0x000043a8 java var 1 sr Lcom/stericson/RootTools/InternalVariables.sfield_BBV:I +0x000043b0 java var 2 sr Lcom/stericson/RootTools/InternalVariables.sfield_FPS:I +0x000043b8 java var 3 sr Lcom/stericson/RootTools/InternalVariables.sfield_GI:I +0x000043c0 java var 4 sr Lcom/stericson/RootTools/InternalVariables.sfield_GS:I +0x000043c8 java var 5 sr Lcom/stericson/RootTools/InternalVariables.sfield_GSYM:I +0x000043d0 java var 6 sr Lcom/stericson/RootTools/InternalVariables.sfield_IAG:I +0x000043d8 java var 7 srf Lcom/stericson/RootTools/InternalVariables.sfield_PS_REGEX:Ljava/lang/String +0x000043e0 java var 8 sr Lcom/stericson/RootTools/InternalVariables.sfield_TAG:Ljava/lang/String +0x000043e8 java var 9 sr Lcom/stericson/RootTools/InternalVariables.sfield_accessGiven:Z +0x000043f0 java var 10 sr Lcom/stericson/RootTools/InternalVariables.sfield_busyboxVersion:Ljava/lang/String +0x000043f8 java var 11 sr Lcom/stericson/RootTools/InternalVariables.sfield_found:Z +0x00004400 java var 12 sr Lcom/stericson/RootTools/InternalVariables.sfield_getSpaceFor:Ljava/lang/String +0x00004408 java var 13 sr Lcom/stericson/RootTools/InternalVariables.sfield_inode:Ljava/lang/String +0x00004410 java var 14 sr Lcom/stericson/RootTools/InternalVariables.sfield_mounts:Ljava/util/ArrayList +0x00004418 java var 15 sr Lcom/stericson/RootTools/InternalVariables.sfield_nativeToolsReady:Z +0x00004420 java var 16 sr Lcom/stericson/RootTools/InternalVariables.sfield_path:Ljava/util/Set +0x00004428 java var 17 sr Lcom/stericson/RootTools/InternalVariables.sfield_permissions:Lcom/stericson/RootTools/Permissions +0x00004430 java var 18 sr Lcom/stericson/RootTools/InternalVariables.sfield_psPattern:Ljava/util/regex/Pattern +0x00004438 java var 19 sr Lcom/stericson/RootTools/InternalVariables.sfield_results:Ljava/util/List +0x00004440 java var 20 sr Lcom/stericson/RootTools/InternalVariables.sfield_space:[Ljava/lang/String +0x00004448 java var 21 sr Lcom/stericson/RootTools/InternalVariables.sfield_symlinks:Ljava/util/ArrayList +0x00004450 java var 22 sr Lcom/stericson/RootTools/InternalVariables.sfield_timeout:I 0x00007b10 [0x00013a6c - 0x00013b50] 228 java class 20 Lcom/stericson/RootTools/Mount :: Ljava/lang/Object; 0x00013a6c java method 0 C Lcom/stericson/RootTools/Mount.method.(Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;)V 0x00013ab4 java method 1 p Lcom/stericson/RootTools/Mount.method.getDevice()Ljava/io/File; @@ -938,73 +938,73 @@ EXPECT=<()V 0x000141a8 java method 1 pC Lcom/stericson/RootTools/RootTools.method.()V -0x000141c0 java method 2 ps Lcom/stericson/RootTools/RootTools.method.checkUtil(Ljava/lang/String;)Z -0x000141dc java method 3 ps Lcom/stericson/RootTools/RootTools.method.closeAllShells()V -0x000141f4 java method 4 ps Lcom/stericson/RootTools/RootTools.method.closeCustomShell()V -0x0001420c java method 5 ps Lcom/stericson/RootTools/RootTools.method.closeShell(Z)V -0x00014230 java method 6 ps Lcom/stericson/RootTools/RootTools.method.copyFile(Ljava/lang/String;Ljava/lang/String;ZZ)Z -0x0001424c java method 7 ps Lcom/stericson/RootTools/RootTools.method.exists(Ljava/lang/String;)Z -0x00014268 java method 8 ps Lcom/stericson/RootTools/RootTools.method.findBinary(Ljava/lang/String;)Z -0x00014284 java method 9 ps Lcom/stericson/RootTools/RootTools.method.fixUtil(Ljava/lang/String;Ljava/lang/String;)V -0x0001429c java method 10 ps Lcom/stericson/RootTools/RootTools.method.fixUtils([Ljava/lang/String;)Z -0x000142b8 java method 11 ps Lcom/stericson/RootTools/RootTools.method.getBusyBoxApplets()Ljava/util/List; -0x000142d8 java method 12 ps Lcom/stericson/RootTools/RootTools.method.getBusyBoxApplets(Ljava/lang/String;)Ljava/util/List; -0x000142f4 java method 13 ps Lcom/stericson/RootTools/RootTools.method.getBusyBoxVersion()Ljava/lang/String; -0x00014314 java method 14 ps Lcom/stericson/RootTools/RootTools.method.getBusyBoxVersion(Ljava/lang/String;)Ljava/lang/String; -0x00014330 java method 15 ps Lcom/stericson/RootTools/RootTools.method.getCustomShell(Ljava/lang/String;)Lcom/stericson/RootTools/Shell; -0x0001434c java method 16 ps Lcom/stericson/RootTools/RootTools.method.getFilePermissionsSymlinks(Ljava/lang/String;)Lcom/stericson/RootTools/Permissions; -0x00014368 java method 17 ps Lcom/stericson/RootTools/RootTools.method.getInode(Ljava/lang/String;)Ljava/lang/String; -0x00014384 java method 18 ps Lcom/stericson/RootTools/RootTools.method.getMountedAs(Ljava/lang/String;)Ljava/lang/String; -0x000143a0 java method 19 ps Lcom/stericson/RootTools/RootTools.method.getMounts()Ljava/util/ArrayList; -0x000143bc java method 20 ps Lcom/stericson/RootTools/RootTools.method.getPath()Ljava/util/Set; -0x000143d8 java method 21 ps Lcom/stericson/RootTools/RootTools.method.getShell(Z)Lcom/stericson/RootTools/Shell; -0x00014400 java method 22 ps Lcom/stericson/RootTools/RootTools.method.getSpace(Ljava/lang/String;)J -0x0001441c java method 23 ps Lcom/stericson/RootTools/RootTools.method.getSymlink(Ljava/lang/String;)Ljava/lang/String; -0x00014438 java method 24 ps Lcom/stericson/RootTools/RootTools.method.getSymlinks(Ljava/lang/String;)Ljava/util/ArrayList; -0x00014454 java method 25 ps Lcom/stericson/RootTools/RootTools.method.getWorkingToolbox()Ljava/lang/String; -0x00014470 java method 26 ps Lcom/stericson/RootTools/RootTools.method.hasEnoughSpaceOnSdCard(J)Z -0x0001448c java method 27 ps Lcom/stericson/RootTools/RootTools.method.hasUtil(Ljava/lang/String;Ljava/lang/String;)Z -0x000144a8 java method 28 ps Lcom/stericson/RootTools/RootTools.method.installBinary(Landroid/content/Context;ILjava/lang/String;)Z -0x000144c8 java method 29 ps Lcom/stericson/RootTools/RootTools.method.installBinary(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)Z -0x000144e4 java method 30 ps Lcom/stericson/RootTools/RootTools.method.isAccessGiven()Z -0x00014500 java method 31 ps Lcom/stericson/RootTools/RootTools.method.isAppletAvailable(Ljava/lang/String;)Z -0x00014520 java method 32 ps Lcom/stericson/RootTools/RootTools.method.isAppletAvailable(Ljava/lang/String;Ljava/lang/String;)Z -0x0001453c java method 33 ps Lcom/stericson/RootTools/RootTools.method.isBusyboxAvailable()Z -0x0001455c java method 34 ps Lcom/stericson/RootTools/RootTools.method.isNativeToolsReady(ILandroid/content/Context;)Z -0x00014578 java method 35 ps Lcom/stericson/RootTools/RootTools.method.isProcessRunning(Ljava/lang/String;)Z -0x00014594 java method 36 ps Lcom/stericson/RootTools/RootTools.method.isRootAvailable()Z -0x000145b4 java method 37 ps Lcom/stericson/RootTools/RootTools.method.killProcess(Ljava/lang/String;)Z -0x000145d0 java method 38 ps Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;)V -0x000145ec java method 39 ps Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;ILjava/lang/Exception;)V -0x00014608 java method 40 ps Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;Ljava/lang/String;)V -0x00014624 java method 41 ps Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;Ljava/lang/String;ILjava/lang/Exception;)V -0x0001468c java method 42 ps Lcom/stericson/RootTools/RootTools.method.offerBusyBox(Landroid/app/Activity;I)Landroid/content/Intent; -0x000146a8 java method 43 ps Lcom/stericson/RootTools/RootTools.method.offerBusyBox(Landroid/app/Activity;)V -0x000146c0 java method 44 ps Lcom/stericson/RootTools/RootTools.method.offerSuperUser(Landroid/app/Activity;I)Landroid/content/Intent; -0x000146dc java method 45 ps Lcom/stericson/RootTools/RootTools.method.offerSuperUser(Landroid/app/Activity;)V -0x000146f4 java method 46 ps Lcom/stericson/RootTools/RootTools.method.remount(Ljava/lang/String;Ljava/lang/String;)Z -0x00014718 java method 47 ps Lcom/stericson/RootTools/RootTools.method.restartAndroid()V -0x00014740 java method 48 ps Lcom/stericson/RootTools/RootTools.method.runBinary(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V -0x00014764 java method 49 ps Lcom/stericson/RootTools/RootTools.method.runShellCommand(Lcom/stericson/RootTools/Shell;Lcom/stericson/RootTools/Command;)V -0x0001477c java method 50 ps Lcom/stericson/RootTools/RootTools.method.sendShell(Ljava/lang/String;I)Ljava/util/List; -0x00014798 java method 51 ps Lcom/stericson/RootTools/RootTools.method.sendShell(Ljava/lang/String;Lcom/stericson/RootTools/RootTools$Result;I)Ljava/util/List; -0x000147c0 java method 52 ps Lcom/stericson/RootTools/RootTools.method.sendShell([Ljava/lang/String;II)Ljava/util/List; -0x000147dc java method 53 ps Lcom/stericson/RootTools/RootTools.method.sendShell([Ljava/lang/String;ILcom/stericson/RootTools/RootTools$Result;I)Ljava/util/List; -0x000147fc java method 54 ps Lcom/stericson/RootTools/RootTools.method.sendShell([Ljava/lang/String;ILcom/stericson/RootTools/RootTools$Result;ZI)Ljava/util/List; -0x000044c0 java var 0 ps Lcom/stericson/RootTools/RootTools.sfield_customShell:Ljava/lang/String -0x000044c8 java var 1 ps Lcom/stericson/RootTools/RootTools.sfield_debugMode:Z -0x000044d0 java var 2 ps Lcom/stericson/RootTools/RootTools.sfield_lastExitCode:I -0x000044d8 java var 3 ps Lcom/stericson/RootTools/RootTools.sfield_lastFoundBinaryPaths:Ljava/util/List -0x000044e0 java var 4 ps Lcom/stericson/RootTools/RootTools.sfield_shellDelay:I -0x000044e8 java var 5 ps Lcom/stericson/RootTools/RootTools.sfield_useRoot:Z -0x000044f0 java var 6 ps Lcom/stericson/RootTools/RootTools.sfield_utilPath:Ljava/lang/String +0x000141c0 java method 2 sp Lcom/stericson/RootTools/RootTools.method.checkUtil(Ljava/lang/String;)Z +0x000141dc java method 3 sp Lcom/stericson/RootTools/RootTools.method.closeAllShells()V +0x000141f4 java method 4 sp Lcom/stericson/RootTools/RootTools.method.closeCustomShell()V +0x0001420c java method 5 sp Lcom/stericson/RootTools/RootTools.method.closeShell(Z)V +0x00014230 java method 6 sp Lcom/stericson/RootTools/RootTools.method.copyFile(Ljava/lang/String;Ljava/lang/String;ZZ)Z +0x0001424c java method 7 sp Lcom/stericson/RootTools/RootTools.method.exists(Ljava/lang/String;)Z +0x00014268 java method 8 sp Lcom/stericson/RootTools/RootTools.method.findBinary(Ljava/lang/String;)Z +0x00014284 java method 9 sp Lcom/stericson/RootTools/RootTools.method.fixUtil(Ljava/lang/String;Ljava/lang/String;)V +0x0001429c java method 10 sp Lcom/stericson/RootTools/RootTools.method.fixUtils([Ljava/lang/String;)Z +0x000142b8 java method 11 sp Lcom/stericson/RootTools/RootTools.method.getBusyBoxApplets()Ljava/util/List; +0x000142d8 java method 12 sp Lcom/stericson/RootTools/RootTools.method.getBusyBoxApplets(Ljava/lang/String;)Ljava/util/List; +0x000142f4 java method 13 sp Lcom/stericson/RootTools/RootTools.method.getBusyBoxVersion()Ljava/lang/String; +0x00014314 java method 14 sp Lcom/stericson/RootTools/RootTools.method.getBusyBoxVersion(Ljava/lang/String;)Ljava/lang/String; +0x00014330 java method 15 sp Lcom/stericson/RootTools/RootTools.method.getCustomShell(Ljava/lang/String;)Lcom/stericson/RootTools/Shell; +0x0001434c java method 16 sp Lcom/stericson/RootTools/RootTools.method.getFilePermissionsSymlinks(Ljava/lang/String;)Lcom/stericson/RootTools/Permissions; +0x00014368 java method 17 sp Lcom/stericson/RootTools/RootTools.method.getInode(Ljava/lang/String;)Ljava/lang/String; +0x00014384 java method 18 sp Lcom/stericson/RootTools/RootTools.method.getMountedAs(Ljava/lang/String;)Ljava/lang/String; +0x000143a0 java method 19 sp Lcom/stericson/RootTools/RootTools.method.getMounts()Ljava/util/ArrayList; +0x000143bc java method 20 sp Lcom/stericson/RootTools/RootTools.method.getPath()Ljava/util/Set; +0x000143d8 java method 21 sp Lcom/stericson/RootTools/RootTools.method.getShell(Z)Lcom/stericson/RootTools/Shell; +0x00014400 java method 22 sp Lcom/stericson/RootTools/RootTools.method.getSpace(Ljava/lang/String;)J +0x0001441c java method 23 sp Lcom/stericson/RootTools/RootTools.method.getSymlink(Ljava/lang/String;)Ljava/lang/String; +0x00014438 java method 24 sp Lcom/stericson/RootTools/RootTools.method.getSymlinks(Ljava/lang/String;)Ljava/util/ArrayList; +0x00014454 java method 25 sp Lcom/stericson/RootTools/RootTools.method.getWorkingToolbox()Ljava/lang/String; +0x00014470 java method 26 sp Lcom/stericson/RootTools/RootTools.method.hasEnoughSpaceOnSdCard(J)Z +0x0001448c java method 27 sp Lcom/stericson/RootTools/RootTools.method.hasUtil(Ljava/lang/String;Ljava/lang/String;)Z +0x000144a8 java method 28 sp Lcom/stericson/RootTools/RootTools.method.installBinary(Landroid/content/Context;ILjava/lang/String;)Z +0x000144c8 java method 29 sp Lcom/stericson/RootTools/RootTools.method.installBinary(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)Z +0x000144e4 java method 30 sp Lcom/stericson/RootTools/RootTools.method.isAccessGiven()Z +0x00014500 java method 31 sp Lcom/stericson/RootTools/RootTools.method.isAppletAvailable(Ljava/lang/String;)Z +0x00014520 java method 32 sp Lcom/stericson/RootTools/RootTools.method.isAppletAvailable(Ljava/lang/String;Ljava/lang/String;)Z +0x0001453c java method 33 sp Lcom/stericson/RootTools/RootTools.method.isBusyboxAvailable()Z +0x0001455c java method 34 sp Lcom/stericson/RootTools/RootTools.method.isNativeToolsReady(ILandroid/content/Context;)Z +0x00014578 java method 35 sp Lcom/stericson/RootTools/RootTools.method.isProcessRunning(Ljava/lang/String;)Z +0x00014594 java method 36 sp Lcom/stericson/RootTools/RootTools.method.isRootAvailable()Z +0x000145b4 java method 37 sp Lcom/stericson/RootTools/RootTools.method.killProcess(Ljava/lang/String;)Z +0x000145d0 java method 38 sp Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;)V +0x000145ec java method 39 sp Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;ILjava/lang/Exception;)V +0x00014608 java method 40 sp Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;Ljava/lang/String;)V +0x00014624 java method 41 sp Lcom/stericson/RootTools/RootTools.method.log(Ljava/lang/String;Ljava/lang/String;ILjava/lang/Exception;)V +0x0001468c java method 42 sp Lcom/stericson/RootTools/RootTools.method.offerBusyBox(Landroid/app/Activity;I)Landroid/content/Intent; +0x000146a8 java method 43 sp Lcom/stericson/RootTools/RootTools.method.offerBusyBox(Landroid/app/Activity;)V +0x000146c0 java method 44 sp Lcom/stericson/RootTools/RootTools.method.offerSuperUser(Landroid/app/Activity;I)Landroid/content/Intent; +0x000146dc java method 45 sp Lcom/stericson/RootTools/RootTools.method.offerSuperUser(Landroid/app/Activity;)V +0x000146f4 java method 46 sp Lcom/stericson/RootTools/RootTools.method.remount(Ljava/lang/String;Ljava/lang/String;)Z +0x00014718 java method 47 sp Lcom/stericson/RootTools/RootTools.method.restartAndroid()V +0x00014740 java method 48 sp Lcom/stericson/RootTools/RootTools.method.runBinary(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V +0x00014764 java method 49 sp Lcom/stericson/RootTools/RootTools.method.runShellCommand(Lcom/stericson/RootTools/Shell;Lcom/stericson/RootTools/Command;)V +0x0001477c java method 50 sp Lcom/stericson/RootTools/RootTools.method.sendShell(Ljava/lang/String;I)Ljava/util/List; +0x00014798 java method 51 sp Lcom/stericson/RootTools/RootTools.method.sendShell(Ljava/lang/String;Lcom/stericson/RootTools/RootTools$Result;I)Ljava/util/List; +0x000147c0 java method 52 sp Lcom/stericson/RootTools/RootTools.method.sendShell([Ljava/lang/String;II)Ljava/util/List; +0x000147dc java method 53 sp Lcom/stericson/RootTools/RootTools.method.sendShell([Ljava/lang/String;ILcom/stericson/RootTools/RootTools$Result;I)Ljava/util/List; +0x000147fc java method 54 sp Lcom/stericson/RootTools/RootTools.method.sendShell([Ljava/lang/String;ILcom/stericson/RootTools/RootTools$Result;ZI)Ljava/util/List; +0x000044c0 java var 0 sp Lcom/stericson/RootTools/RootTools.sfield_customShell:Ljava/lang/String +0x000044c8 java var 1 sp Lcom/stericson/RootTools/RootTools.sfield_debugMode:Z +0x000044d0 java var 2 sp Lcom/stericson/RootTools/RootTools.sfield_lastExitCode:I +0x000044d8 java var 3 sp Lcom/stericson/RootTools/RootTools.sfield_lastFoundBinaryPaths:Ljava/util/List +0x000044e0 java var 4 sp Lcom/stericson/RootTools/RootTools.sfield_shellDelay:I +0x000044e8 java var 5 sp Lcom/stericson/RootTools/RootTools.sfield_useRoot:Z +0x000044f0 java var 6 sp Lcom/stericson/RootTools/RootTools.sfield_utilPath:Ljava/lang/String 0x00007b90 [0x0001482c - 0x00014834] 8 java class 24 Lcom/stericson/RootTools/RootToolsException :: Ljava/lang/Exception; 0x0001482c java method 0 pC Lcom/stericson/RootTools/RootToolsException.method.(Ljava/lang/Throwable;)V -0x000044f8 java var 0 Psf Lcom/stericson/RootTools/RootToolsException.sfield_serialVersionUID:J +0x000044f8 java var 0 sPf Lcom/stericson/RootTools/RootToolsException.sfield_serialVersionUID:J 0x00007bb0 [0x00014844 - 0x0001491e] 218 java class 25 Lcom/stericson/RootTools/Runner :: Ljava/lang/Thread; 0x00014844 java method 0 pC Lcom/stericson/RootTools/Runner.method.(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V 0x00014868 java method 1 p Lcom/stericson/RootTools/Runner.method.run()V -0x00004500 java var 0 Psf Lcom/stericson/RootTools/Runner.sfield_LOG_TAG:Ljava/lang/String +0x00004500 java var 0 sPf Lcom/stericson/RootTools/Runner.sfield_LOG_TAG:Ljava/lang/String 0x00004508 java var 1 Lcom/stericson/RootTools/Runner.ifield_binaryName:Ljava/lang/String 0x00004510 java var 2 Lcom/stericson/RootTools/Runner.ifield_context:Landroid/content/Context 0x00004518 java var 3 Lcom/stericson/RootTools/Runner.ifield_parameter:Ljava/lang/String @@ -1023,12 +1023,12 @@ EXPECT=<(Lcom/stericson/RootTools/SanityCheckRootTools;)V 0x00015494 java method 1 hC Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.method.(Lcom/stericson/RootTools/SanityCheckRootTools;Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler;)V 0x000154ac java method 2 p Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.method.handleMessage(Landroid/os/Message;)V -0x00004548 java var 0 psf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION:Ljava/lang/String -0x00004550 java var 1 psf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_DISPLAY:I -0x00004558 java var 2 psf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_HIDE:I -0x00004560 java var 3 psf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_PDISPLAY:I -0x00004568 java var 4 psf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_SHOW:I -0x00004570 java var 5 psf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_TEXT:Ljava/lang/String +0x00004548 java var 0 spf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION:Ljava/lang/String +0x00004550 java var 1 spf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_DISPLAY:I +0x00004558 java var 2 spf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_HIDE:I +0x00004560 java var 3 spf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_PDISPLAY:I +0x00004568 java var 4 spf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_ACTION_SHOW:I +0x00004570 java var 5 spf Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.sfield_TEXT:Ljava/lang/String 0x00004578 java var 6 fh Lcom/stericson/RootTools/SanityCheckRootTools$TestHandler.ifield_this$0:Lcom/stericson/RootTools/SanityCheckRootTools 0x00007c30 [0x00015570 - 0x00015740] 464 java class 29 Lcom/stericson/RootTools/SanityCheckRootTools :: Landroid/app/Activity; 0x00015570 java method 0 pC Lcom/stericson/RootTools/SanityCheckRootTools.method.()V @@ -1062,31 +1062,31 @@ EXPECT=<()V 0x00016f3c java method 1 pC Lcom/sun/activation/registries/MailcapParseException.method.(Ljava/lang/String;)V 0x00007d70 [0x00016f54 - 0x0001774a] 2038 java class 39 Lcom/sun/activation/registries/MailcapTokenizer :: Ljava/lang/Object; 0x00016f54 java method 0 pC Lcom/sun/activation/registries/MailcapTokenizer.method.(Ljava/lang/String;)V -0x00016f9c java method 1 Ps Lcom/sun/activation/registries/MailcapTokenizer.method.fixEscapeSequences(Ljava/lang/String;)Ljava/lang/String; -0x00017018 java method 2 ps Lcom/sun/activation/registries/MailcapTokenizer.method.isAutoquoteSpecialChar(C)Z -0x0001704c java method 3 ps Lcom/sun/activation/registries/MailcapTokenizer.method.isControlChar(C)Z -0x00017068 java method 4 ps Lcom/sun/activation/registries/MailcapTokenizer.method.isSpecialChar(C)Z -0x00017104 java method 5 ps Lcom/sun/activation/registries/MailcapTokenizer.method.isStringTokenChar(C)Z -0x00017140 java method 6 ps Lcom/sun/activation/registries/MailcapTokenizer.method.isWhiteSpaceChar(C)Z -0x0001715c java method 7 ps Lcom/sun/activation/registries/MailcapTokenizer.method.main([Ljava/lang/String;)V -0x00017420 java method 8 ps Lcom/sun/activation/registries/MailcapTokenizer.method.nameForToken(I)Ljava/lang/String; +0x00016f9c java method 1 sP Lcom/sun/activation/registries/MailcapTokenizer.method.fixEscapeSequences(Ljava/lang/String;)Ljava/lang/String; +0x00017018 java method 2 sp Lcom/sun/activation/registries/MailcapTokenizer.method.isAutoquoteSpecialChar(C)Z +0x0001704c java method 3 sp Lcom/sun/activation/registries/MailcapTokenizer.method.isControlChar(C)Z +0x00017068 java method 4 sp Lcom/sun/activation/registries/MailcapTokenizer.method.isSpecialChar(C)Z +0x00017104 java method 5 sp Lcom/sun/activation/registries/MailcapTokenizer.method.isStringTokenChar(C)Z +0x00017140 java method 6 sp Lcom/sun/activation/registries/MailcapTokenizer.method.isWhiteSpaceChar(C)Z +0x0001715c java method 7 sp Lcom/sun/activation/registries/MailcapTokenizer.method.main([Ljava/lang/String;)V +0x00017420 java method 8 sp Lcom/sun/activation/registries/MailcapTokenizer.method.nameForToken(I)Ljava/lang/String; 0x000174a4 java method 9 P Lcom/sun/activation/registries/MailcapTokenizer.method.processAutoquoteToken()V 0x00017518 java method 10 P Lcom/sun/activation/registries/MailcapTokenizer.method.processStringToken()V 0x00017580 java method 11 p Lcom/sun/activation/registries/MailcapTokenizer.method.getCurrentToken()I @@ -1155,13 +1155,13 @@ EXPECT=<()V 0x00017820 java method 1 pC Lcom/sun/activation/registries/MimeTypeFile.method.(Ljava/io/InputStream;)V 0x00017864 java method 2 pC Lcom/sun/activation/registries/MimeTypeFile.method.(Ljava/lang/String;)V -0x000178f4 java method 3 ps Lcom/sun/activation/registries/MimeTypeFile.method.main([Ljava/lang/String;)V +0x000178f4 java method 3 sp Lcom/sun/activation/registries/MimeTypeFile.method.main([Ljava/lang/String;)V 0x00017970 java method 4 P Lcom/sun/activation/registries/MimeTypeFile.method.parse(Ljava/io/BufferedReader;)V 0x00017a08 java method 5 P Lcom/sun/activation/registries/MimeTypeFile.method.parseEntry(Ljava/lang/String;)V 0x00017bf4 java method 6 p Lcom/sun/activation/registries/MimeTypeFile.method.appendToRegistry(Ljava/lang/String;)V 0x00017c34 java method 7 p Lcom/sun/activation/registries/MimeTypeFile.method.getMIMETypeString(Ljava/lang/String;)Ljava/lang/String; 0x00017c60 java method 8 p Lcom/sun/activation/registries/MimeTypeFile.method.getMimeTypeEntry(Ljava/lang/String;)Lcom/sun/activation/registries/MimeTypeEntry; -0x00004700 java var 0 Ps Lcom/sun/activation/registries/MimeTypeFile.sfield_DEBUG:Z +0x00004700 java var 0 sP Lcom/sun/activation/registries/MimeTypeFile.sfield_DEBUG:Z 0x00004708 java var 1 P Lcom/sun/activation/registries/MimeTypeFile.ifield_fname:Ljava/lang/String 0x00004710 java var 2 P Lcom/sun/activation/registries/MimeTypeFile.ifield_type_hash:Ljava/util/Hashtable 0x00007dd0 [0x00017c84 - 0x00017d22] 158 java class 42 Lcom/sun/activation/viewers/ImageViewerCanvas :: Ljava/awt/Canvas; @@ -1223,14 +1223,14 @@ EXPECT=<()V 0x00018020 java method 1 pC Ljavax/activation/CommandMap.method.()V 0x00018038 java method 2 s Ljavax/activation/CommandMap.method.class$(Ljava/lang/String;)Ljava/lang/Class; -0x00018078 java method 3 ps Ljavax/activation/CommandMap.method.getDefaultCommandMap()Ljavax/activation/CommandMap; -0x000180a4 java method 4 ps Ljavax/activation/CommandMap.method.setDefaultCommandMap(Ljavax/activation/CommandMap;)V +0x00018078 java method 3 sp Ljavax/activation/CommandMap.method.getDefaultCommandMap()Ljavax/activation/CommandMap; +0x000180a4 java method 4 sp Ljavax/activation/CommandMap.method.setDefaultCommandMap(Ljavax/activation/CommandMap;)V 0x0000abab java method 5 pa Ljavax/activation/CommandMap.method.createDataContentHandler(Ljava/lang/String;)Ljavax/activation/DataContentHandler; 0x0000abb0 java method 6 pa Ljavax/activation/CommandMap.method.getAllCommands(Ljava/lang/String;)[Ljavax/activation/CommandInfo; 0x0000abb4 java method 7 pa Ljavax/activation/CommandMap.method.getCommand(Ljava/lang/String;Ljava/lang/String;)Ljavax/activation/CommandInfo; 0x0000abb8 java method 8 pa Ljavax/activation/CommandMap.method.getPreferredCommands(Ljava/lang/String;)[Ljavax/activation/CommandInfo; 0x00004858 java var 0 s Ljavax/activation/CommandMap.sfield_class$javax$activation$CommandMap:Ljava/lang/Class -0x00004860 java var 1 Ps Ljavax/activation/CommandMap.sfield_defaultCommandMap:Ljavax/activation/CommandMap +0x00004860 java var 1 sP Ljavax/activation/CommandMap.sfield_defaultCommandMap:Ljavax/activation/CommandMap 0x00007e50 [0x0000abc0 - 0x0000abc0] 0 java class 46 Ljavax/activation/CommandObject :: Ljava/lang/Object; 0x0000abc0 java method 0 pa Ljavax/activation/CommandObject.method.setCommandContext(Ljava/lang/String;Ljavax/activation/DataHandler;)V 0x00007e70 [0x0000abc9 - 0x0000abd6] 13 java class 47 Ljavax/activation/DataContentHandler :: Ljava/lang/Object; @@ -1257,7 +1257,7 @@ EXPECT=<()V 0x00018984 java method 1 pC Ljavax/activation/FileTypeMap.method.()V 0x0001899c java method 2 s Ljavax/activation/FileTypeMap.method.class$(Ljava/lang/String;)Ljava/lang/Class; -0x000189dc java method 3 ps Ljavax/activation/FileTypeMap.method.getDefaultFileTypeMap()Ljavax/activation/FileTypeMap; -0x00018a08 java method 4 ps Ljavax/activation/FileTypeMap.method.setDefaultFileTypeMap(Ljavax/activation/FileTypeMap;)V +0x000189dc java method 3 sp Ljavax/activation/FileTypeMap.method.getDefaultFileTypeMap()Ljavax/activation/FileTypeMap; +0x00018a08 java method 4 sp Ljavax/activation/FileTypeMap.method.setDefaultFileTypeMap(Ljavax/activation/FileTypeMap;)V 0x0000acf0 java method 5 pa Ljavax/activation/FileTypeMap.method.getContentType(Ljava/io/File;)Ljava/lang/String; 0x0000acf5 java method 6 pa Ljavax/activation/FileTypeMap.method.getContentType(Ljava/lang/String;)Ljava/lang/String; 0x00004918 java var 0 s Ljavax/activation/FileTypeMap.sfield_class$javax$activation$FileTypeMap:Ljava/lang/Class -0x00004920 java var 1 Ps Ljavax/activation/FileTypeMap.sfield_defaultMap:Ljavax/activation/FileTypeMap +0x00004920 java var 1 sP Ljavax/activation/FileTypeMap.sfield_defaultMap:Ljavax/activation/FileTypeMap 0x00007f30 [0x00018a80 - 0x00018fca] 1354 java class 53 Ljavax/activation/MimeType :: Ljava/lang/Object; 0x00018a80 java method 0 pC Ljavax/activation/MimeType.method.()V 0x00018ab8 java method 1 pC Ljavax/activation/MimeType.method.(Ljava/lang/String;)V 0x00018ad8 java method 2 pC Ljavax/activation/MimeType.method.(Ljava/lang/String;Ljava/lang/String;)V -0x00018b50 java method 3 Ps Ljavax/activation/MimeType.method.isTokenChar(C)Z +0x00018b50 java method 3 sP Ljavax/activation/MimeType.method.isTokenChar(C)Z 0x00018b88 java method 4 P Ljavax/activation/MimeType.method.isValidToken(Ljava/lang/String;)Z 0x00018bcc java method 5 P Ljavax/activation/MimeType.method.parse(Ljava/lang/String;)V 0x00018d24 java method 6 p Ljavax/activation/MimeType.method.getBaseType()Ljava/lang/String; @@ -1322,17 +1322,17 @@ EXPECT=<()V 0x00019004 java method 1 pC Ljavax/activation/MimeTypeParameterList.method.(Ljava/lang/String;)V -0x00019030 java method 2 Ps Ljavax/activation/MimeTypeParameterList.method.isTokenChar(C)Z -0x00019068 java method 3 Ps Ljavax/activation/MimeTypeParameterList.method.quote(Ljava/lang/String;)Ljava/lang/String; -0x00019110 java method 4 Ps Ljavax/activation/MimeTypeParameterList.method.skipWhiteSpace(Ljava/lang/String;I)I -0x00019148 java method 5 Ps Ljavax/activation/MimeTypeParameterList.method.unquote(Ljava/lang/String;)Ljava/lang/String; +0x00019030 java method 2 sP Ljavax/activation/MimeTypeParameterList.method.isTokenChar(C)Z +0x00019068 java method 3 sP Ljavax/activation/MimeTypeParameterList.method.quote(Ljava/lang/String;)Ljava/lang/String; +0x00019110 java method 4 sP Ljavax/activation/MimeTypeParameterList.method.skipWhiteSpace(Ljava/lang/String;I)I +0x00019148 java method 5 sP Ljavax/activation/MimeTypeParameterList.method.unquote(Ljava/lang/String;)Ljava/lang/String; 0x000191b8 java method 6 p Ljavax/activation/MimeTypeParameterList.method.get(Ljava/lang/String;)Ljava/lang/String; 0x000191ec java method 7 p Ljavax/activation/MimeTypeParameterList.method.getNames()Ljava/util/Enumeration; 0x0001920c java method 8 p Ljavax/activation/MimeTypeParameterList.method.isEmpty()Z @@ -1341,7 +1341,7 @@ EXPECT=<()V @@ -1369,7 +1369,7 @@ EXPECT=<()V -0x00004a48 java var 0 psf Lorg/radare/radare2installer/BuildConfig.sfield_DEBUG:Z +0x00004a48 java var 0 spf Lorg/radare/radare2installer/BuildConfig.sfield_DEBUG:Z 0x00008010 [0x0001995c - 0x00019a56] 250 java class 60 Lorg/radare/radare2installer/ConsoleActivity$1 :: Ljava/lang/Object; 0x0001995c java method 0 C Lorg/radare/radare2installer/ConsoleActivity$1.method.(Lorg/radare/radare2installer/ConsoleActivity;)V 0x00019978 java method 1 p Lorg/radare/radare2installer/ConsoleActivity$1.method.onClick(Landroid/view/View;)V @@ -1394,7 +1394,7 @@ EXPECT=<()V -0x0001a538 java method 1 Ps Lorg/radare/radare2installer/LauncherActivity.method.filterSingleQuote(Ljava/lang/String;)Ljava/lang/String; +0x0001a538 java method 1 sP Lorg/radare/radare2installer/LauncherActivity.method.filterSingleQuote(Ljava/lang/String;)Ljava/lang/String; 0x0001a574 java method 2 P Lorg/radare/radare2installer/LauncherActivity.method.findTerminalApp()Ljava/lang/String; 0x0001a5cc java method 3 p Lorg/radare/radare2installer/LauncherActivity.method.onCreate(Landroid/os/Bundle;)V 0x0001a7a8 java method 4 r Lorg/radare/radare2installer/LauncherActivity.method.onPause()V @@ -1494,7 +1494,7 @@ EXPECT=<()V -0x00004bf0 java var 0 psf Lorg/radare/radare2installer/R$array.sfield_updateInterval:I -0x00004bf8 java var 1 psf Lorg/radare/radare2installer/R$array.sfield_updateIntervalValues:I +0x00004bf0 java var 0 spf Lorg/radare/radare2installer/R$array.sfield_updateInterval:I +0x00004bf8 java var 1 spf Lorg/radare/radare2installer/R$array.sfield_updateIntervalValues:I 0x00008290 [0x0001d28c - 0x0001d294] 8 java class 80 Lorg/radare/radare2installer/R$attr :: Ljava/lang/Object; 0x0001d28c java method 0 pC Lorg/radare/radare2installer/R$attr.method.()V 0x000082b0 [0x0001d2a4 - 0x0001d2ac] 8 java class 81 Lorg/radare/radare2installer/R$drawable :: Ljava/lang/Object; 0x0001d2a4 java method 0 pC Lorg/radare/radare2installer/R$drawable.method.()V -0x00004c00 java var 0 psf Lorg/radare/radare2installer/R$drawable.sfield_icon:I -0x00004c08 java var 1 psf Lorg/radare/radare2installer/R$drawable.sfield_icon2:I +0x00004c00 java var 0 spf Lorg/radare/radare2installer/R$drawable.sfield_icon:I +0x00004c08 java var 1 spf Lorg/radare/radare2installer/R$drawable.sfield_icon2:I 0x000082d0 [0x0001d2bc - 0x0001d2c4] 8 java class 82 Lorg/radare/radare2installer/R$id :: Ljava/lang/Object; 0x0001d2bc java method 0 pC Lorg/radare/radare2installer/R$id.method.()V -0x00004c10 java var 0 psf Lorg/radare/radare2installer/R$id.sfield_button_debug:I -0x00004c18 java var 1 psf Lorg/radare/radare2installer/R$id.sfield_button_open:I -0x00004c20 java var 2 psf Lorg/radare/radare2installer/R$id.sfield_checkGithub:I -0x00004c28 java var 3 psf Lorg/radare/radare2installer/R$id.sfield_checkbox:I -0x00004c30 java var 4 psf Lorg/radare/radare2installer/R$id.sfield_checkhg:I -0x00004c38 java var 5 psf Lorg/radare/radare2installer/R$id.sfield_checklocal:I -0x00004c40 java var 6 psf Lorg/radare/radare2installer/R$id.sfield_consoleInput:I -0x00004c48 java var 7 psf Lorg/radare/radare2installer/R$id.sfield_consoleOutput:I -0x00004c50 java var 8 psf Lorg/radare/radare2installer/R$id.sfield_dialog_ret:I -0x00004c58 java var 9 psf Lorg/radare/radare2installer/R$id.sfield_file_to_open:I -0x00004c60 java var 10 psf Lorg/radare/radare2installer/R$id.sfield_help_text:I -0x00004c68 java var 11 psf Lorg/radare/radare2installer/R$id.sfield_image:I -0x00004c70 java var 12 psf Lorg/radare/radare2installer/R$id.sfield_intro_text:I -0x00004c78 java var 13 psf Lorg/radare/radare2installer/R$id.sfield_localRunButton:I -0x00004c80 java var 14 psf Lorg/radare/radare2installer/R$id.sfield_outputView:I -0x00004c88 java var 15 psf Lorg/radare/radare2installer/R$id.sfield_quitButton:I -0x00004c90 java var 16 psf Lorg/radare/radare2installer/R$id.sfield_radiobutton_browser:I -0x00004c98 java var 17 psf Lorg/radare/radare2installer/R$id.sfield_radiobutton_console:I -0x00004ca0 java var 18 psf Lorg/radare/radare2installer/R$id.sfield_radiobutton_terminal:I -0x00004ca8 java var 19 psf Lorg/radare/radare2installer/R$id.sfield_radiobutton_web:I -0x00004cb0 java var 20 psf Lorg/radare/radare2installer/R$id.sfield_radiogroup1:I -0x00004cb8 java var 21 psf Lorg/radare/radare2installer/R$id.sfield_remoteRunButton:I -0x00004cc0 java var 22 psf Lorg/radare/radare2installer/R$id.sfield_runButton:I -0x00004cc8 java var 23 psf Lorg/radare/radare2installer/R$id.sfield_scrollOutput:I -0x00004cd0 java var 24 psf Lorg/radare/radare2installer/R$id.sfield_text:I -0x00004cd8 java var 25 psf Lorg/radare/radare2installer/R$id.sfield_toast_layout_root:I -0x00004ce0 java var 26 psf Lorg/radare/radare2installer/R$id.sfield_webview:I -0x00004ce8 java var 27 psf Lorg/radare/radare2installer/R$id.sfield_widget48:I +0x00004c10 java var 0 spf Lorg/radare/radare2installer/R$id.sfield_button_debug:I +0x00004c18 java var 1 spf Lorg/radare/radare2installer/R$id.sfield_button_open:I +0x00004c20 java var 2 spf Lorg/radare/radare2installer/R$id.sfield_checkGithub:I +0x00004c28 java var 3 spf Lorg/radare/radare2installer/R$id.sfield_checkbox:I +0x00004c30 java var 4 spf Lorg/radare/radare2installer/R$id.sfield_checkhg:I +0x00004c38 java var 5 spf Lorg/radare/radare2installer/R$id.sfield_checklocal:I +0x00004c40 java var 6 spf Lorg/radare/radare2installer/R$id.sfield_consoleInput:I +0x00004c48 java var 7 spf Lorg/radare/radare2installer/R$id.sfield_consoleOutput:I +0x00004c50 java var 8 spf Lorg/radare/radare2installer/R$id.sfield_dialog_ret:I +0x00004c58 java var 9 spf Lorg/radare/radare2installer/R$id.sfield_file_to_open:I +0x00004c60 java var 10 spf Lorg/radare/radare2installer/R$id.sfield_help_text:I +0x00004c68 java var 11 spf Lorg/radare/radare2installer/R$id.sfield_image:I +0x00004c70 java var 12 spf Lorg/radare/radare2installer/R$id.sfield_intro_text:I +0x00004c78 java var 13 spf Lorg/radare/radare2installer/R$id.sfield_localRunButton:I +0x00004c80 java var 14 spf Lorg/radare/radare2installer/R$id.sfield_outputView:I +0x00004c88 java var 15 spf Lorg/radare/radare2installer/R$id.sfield_quitButton:I +0x00004c90 java var 16 spf Lorg/radare/radare2installer/R$id.sfield_radiobutton_browser:I +0x00004c98 java var 17 spf Lorg/radare/radare2installer/R$id.sfield_radiobutton_console:I +0x00004ca0 java var 18 spf Lorg/radare/radare2installer/R$id.sfield_radiobutton_terminal:I +0x00004ca8 java var 19 spf Lorg/radare/radare2installer/R$id.sfield_radiobutton_web:I +0x00004cb0 java var 20 spf Lorg/radare/radare2installer/R$id.sfield_radiogroup1:I +0x00004cb8 java var 21 spf Lorg/radare/radare2installer/R$id.sfield_remoteRunButton:I +0x00004cc0 java var 22 spf Lorg/radare/radare2installer/R$id.sfield_runButton:I +0x00004cc8 java var 23 spf Lorg/radare/radare2installer/R$id.sfield_scrollOutput:I +0x00004cd0 java var 24 spf Lorg/radare/radare2installer/R$id.sfield_text:I +0x00004cd8 java var 25 spf Lorg/radare/radare2installer/R$id.sfield_toast_layout_root:I +0x00004ce0 java var 26 spf Lorg/radare/radare2installer/R$id.sfield_webview:I +0x00004ce8 java var 27 spf Lorg/radare/radare2installer/R$id.sfield_widget48:I 0x000082f0 [0x0001d2d4 - 0x0001d2dc] 8 java class 83 Lorg/radare/radare2installer/R$layout :: Ljava/lang/Object; 0x0001d2d4 java method 0 pC Lorg/radare/radare2installer/R$layout.method.()V -0x00004cf0 java var 0 psf Lorg/radare/radare2installer/R$layout.sfield_console:I -0x00004cf8 java var 1 psf Lorg/radare/radare2installer/R$layout.sfield_dialog:I -0x00004d00 java var 2 psf Lorg/radare/radare2installer/R$layout.sfield_launch:I -0x00004d08 java var 3 psf Lorg/radare/radare2installer/R$layout.sfield_main:I -0x00004d10 java var 4 psf Lorg/radare/radare2installer/R$layout.sfield_toast_layout:I -0x00004d18 java var 5 psf Lorg/radare/radare2installer/R$layout.sfield_webactivity:I +0x00004cf0 java var 0 spf Lorg/radare/radare2installer/R$layout.sfield_console:I +0x00004cf8 java var 1 spf Lorg/radare/radare2installer/R$layout.sfield_dialog:I +0x00004d00 java var 2 spf Lorg/radare/radare2installer/R$layout.sfield_launch:I +0x00004d08 java var 3 spf Lorg/radare/radare2installer/R$layout.sfield_main:I +0x00004d10 java var 4 spf Lorg/radare/radare2installer/R$layout.sfield_toast_layout:I +0x00004d18 java var 5 spf Lorg/radare/radare2installer/R$layout.sfield_webactivity:I 0x00008310 [0x0001d2ec - 0x0001d2f4] 8 java class 84 Lorg/radare/radare2installer/R$string :: Ljava/lang/Object; 0x0001d2ec java method 0 pC Lorg/radare/radare2installer/R$string.method.()V -0x00004d20 java var 0 psf Lorg/radare/radare2installer/R$string.sfield_app_name:I -0x00004d28 java var 1 psf Lorg/radare/radare2installer/R$string.sfield_service_name:I +0x00004d20 java var 0 spf Lorg/radare/radare2installer/R$string.sfield_app_name:I +0x00004d28 java var 1 spf Lorg/radare/radare2installer/R$string.sfield_service_name:I 0x00008330 [0x0001d304 - 0x0001d30c] 8 java class 85 Lorg/radare/radare2installer/R$style :: Ljava/lang/Object; 0x0001d304 java method 0 pC Lorg/radare/radare2installer/R$style.method.()V -0x00004d30 java var 0 psf Lorg/radare/radare2installer/R$style.sfield_AppTheme:I +0x00004d30 java var 0 spf Lorg/radare/radare2installer/R$style.sfield_AppTheme:I 0x00008350 [0x0001d31c - 0x0001d324] 8 java class 86 Lorg/radare/radare2installer/R$xml :: Ljava/lang/Object; 0x0001d31c java method 0 pC Lorg/radare/radare2installer/R$xml.method.()V -0x00004d38 java var 0 psf Lorg/radare/radare2installer/R$xml.sfield_preferences:I +0x00004d38 java var 0 spf Lorg/radare/radare2installer/R$xml.sfield_preferences:I 0x00008370 [0x0001d334 - 0x0001d33c] 8 java class 87 Lorg/radare/radare2installer/R :: Ljava/lang/Object; 0x0001d334 java method 0 pC Lorg/radare/radare2installer/R.method.()V 0x00008390 [0x0001d34c - 0x0001d376] 42 java class 88 Lorg/radare/radare2installer/SettingsActivity :: Landroid/preference/PreferenceActivity; @@ -1587,9 +1587,9 @@ EXPECT=<(Lorg/radare/radare2installer/UpdateCheckerService;)V 0x0001d3a4 java method 1 hC Lorg/radare/radare2installer/UpdateCheckerService$PollTask.method.(Lorg/radare/radare2installer/UpdateCheckerService;Lorg/radare/radare2installer/UpdateCheckerService$1;)V -0x0001d3bc java method 2 rhb Lorg/radare/radare2installer/UpdateCheckerService$PollTask.method.doInBackground([Ljava/lang/Object;)Ljava/lang/Object; +0x0001d3bc java method 2 rbh Lorg/radare/radare2installer/UpdateCheckerService$PollTask.method.doInBackground([Ljava/lang/Object;)Ljava/lang/Object; 0x0001d3dc java method 3 rg Lorg/radare/radare2installer/UpdateCheckerService$PollTask.method.doInBackground([Ljava/lang/Void;)Ljava/lang/Void; -0x0001d4d0 java method 4 rhb Lorg/radare/radare2installer/UpdateCheckerService$PollTask.method.onPostExecute(Ljava/lang/Object;)V +0x0001d4d0 java method 4 rbh Lorg/radare/radare2installer/UpdateCheckerService$PollTask.method.onPostExecute(Ljava/lang/Object;)V 0x0001d4ec java method 5 r Lorg/radare/radare2installer/UpdateCheckerService$PollTask.method.onPostExecute(Ljava/lang/Void;)V 0x00004d40 java var 0 fh Lorg/radare/radare2installer/UpdateCheckerService$PollTask.ifield_this$0:Lorg/radare/radare2installer/UpdateCheckerService 0x000083f0 [0x0001d598 - 0x0001d6ee] 342 java class 91 Lorg/radare/radare2installer/UpdateCheckerService :: Landroid/app/Service; @@ -1626,7 +1626,7 @@ EXPECT=<()V -0x0001e930 java method 1 ps Lcom/ice/tar/tar.method.main([Ljava/lang/String;)V +0x0001e930 java method 1 sp Lcom/ice/tar/tar.method.main([Ljava/lang/String;)V 0x0001e954 java method 2 P Lcom/ice/tar/tar.method.processArguments([Ljava/lang/String;)I 0x0001eecc java method 3 P Lcom/ice/tar/tar.method.usage()V 0x0001f0c8 java method 4 P Lcom/ice/tar/tar.method.version()V @@ -1691,39 +1691,39 @@ EXPECT=<(I[Ljava/lang/String;)V +0x0001f4a8 java method 0 pgC Lcom/stericson/RootTools/CommandCapture.method.(I[Ljava/lang/String;)V 0x0001f4d0 java method 1 p Lcom/stericson/RootTools/CommandCapture.method.output(ILjava/lang/String;)V 0x0001f534 java method 2 p Lcom/stericson/RootTools/CommandCapture.method.toString()Ljava/lang/String; 0x000042f8 java var 0 P Lcom/stericson/RootTools/CommandCapture.ifield_sb:Ljava/lang/StringBuilder 0x00008510 [0x0001f554 - 0x0001f582] 46 java class 100 Lcom/stericson/RootTools/InternalMethods$1 :: Lcom/stericson/RootTools/Command; -0x0001f554 java method 0 Cg Lcom/stericson/RootTools/InternalMethods$1.method.(I[Ljava/lang/String;Ljava/util/List;)V +0x0001f554 java method 0 gC Lcom/stericson/RootTools/InternalMethods$1.method.(I[Ljava/lang/String;Ljava/util/List;)V 0x0001f570 java method 1 p Lcom/stericson/RootTools/InternalMethods$1.method.output(ILjava/lang/String;)V 0x00004370 java var 0 Pfh Lcom/stericson/RootTools/InternalMethods$1.ifield_val$result:Ljava/util/List 0x00008530 [0x0001f594 - 0x0001f5f4] 96 java class 101 Lcom/stericson/RootTools/InternalMethods$2 :: Lcom/stericson/RootTools/Command; -0x0001f594 java method 0 Cg Lcom/stericson/RootTools/InternalMethods$2.method.(I[Ljava/lang/String;Ljava/util/List;)V +0x0001f594 java method 0 gC Lcom/stericson/RootTools/InternalMethods$2.method.(I[Ljava/lang/String;Ljava/util/List;)V 0x0001f5b0 java method 1 p Lcom/stericson/RootTools/InternalMethods$2.method.output(ILjava/lang/String;)V 0x00004378 java var 0 Pfh Lcom/stericson/RootTools/InternalMethods$2.ifield_val$results:Ljava/util/List 0x00008550 [0x0001f604 - 0x0001f64c] 72 java class 102 Lcom/stericson/RootTools/InternalMethods$3 :: Lcom/stericson/RootTools/Command; -0x0001f604 java method 0 Cg Lcom/stericson/RootTools/InternalMethods$3.method.(I[Ljava/lang/String;)V +0x0001f604 java method 0 gC Lcom/stericson/RootTools/InternalMethods$3.method.(I[Ljava/lang/String;)V 0x0001f61c java method 1 p Lcom/stericson/RootTools/InternalMethods$3.method.output(ILjava/lang/String;)V 0x00008570 [0x0001f65c - 0x0001f6e6] 138 java class 103 Lcom/stericson/RootTools/InternalMethods$4 :: Lcom/stericson/RootTools/Command; -0x0001f65c java method 0 Cg Lcom/stericson/RootTools/InternalMethods$4.method.(I[Ljava/lang/String;)V +0x0001f65c java method 0 gC Lcom/stericson/RootTools/InternalMethods$4.method.(I[Ljava/lang/String;)V 0x0001f674 java method 1 p Lcom/stericson/RootTools/InternalMethods$4.method.output(ILjava/lang/String;)V 0x00008590 [0x0001f6f8 - 0x0001f79a] 162 java class 104 Lcom/stericson/RootTools/InternalMethods$5 :: Lcom/stericson/RootTools/Command; -0x0001f6f8 java method 0 Cg Lcom/stericson/RootTools/InternalMethods$5.method.(I[Ljava/lang/String;)V +0x0001f6f8 java method 0 gC Lcom/stericson/RootTools/InternalMethods$5.method.(I[Ljava/lang/String;)V 0x0001f710 java method 1 p Lcom/stericson/RootTools/InternalMethods$5.method.output(ILjava/lang/String;)V 0x000085b0 [0x0001f7ac - 0x0001f892] 230 java class 105 Lcom/stericson/RootTools/InternalMethods$6 :: Lcom/stericson/RootTools/Command; -0x0001f7ac java method 0 Cg Lcom/stericson/RootTools/InternalMethods$6.method.(I[Ljava/lang/String;)V +0x0001f7ac java method 0 gC Lcom/stericson/RootTools/InternalMethods$6.method.(I[Ljava/lang/String;)V 0x0001f7c4 java method 1 p Lcom/stericson/RootTools/InternalMethods$6.method.output(ILjava/lang/String;)V 0x000085d0 [0x0001f8c0 - 0x0001f92a] 106 java class 106 Lcom/stericson/RootTools/InternalMethods$7 :: Lcom/stericson/RootTools/Command; -0x0001f8c0 java method 0 Cg Lcom/stericson/RootTools/InternalMethods$7.method.(I[Ljava/lang/String;)V +0x0001f8c0 java method 0 gC Lcom/stericson/RootTools/InternalMethods$7.method.(I[Ljava/lang/String;)V 0x0001f8d8 java method 1 p Lcom/stericson/RootTools/InternalMethods$7.method.output(ILjava/lang/String;)V 0x000085f0 [0x0001f93c - 0x0001f984] 72 java class 107 Lcom/stericson/RootTools/InternalMethods$8 :: Lcom/stericson/RootTools/Command; -0x0001f93c java method 0 Cg Lcom/stericson/RootTools/InternalMethods$8.method.(I[Ljava/lang/String;Ljava/util/List;)V +0x0001f93c java method 0 gC Lcom/stericson/RootTools/InternalMethods$8.method.(I[Ljava/lang/String;Ljava/util/List;)V 0x0001f958 java method 1 p Lcom/stericson/RootTools/InternalMethods$8.method.output(ILjava/lang/String;)V 0x00004388 java var 0 Pfh Lcom/stericson/RootTools/InternalMethods$8.ifield_val$results:Ljava/util/List 0x00008610 [0x0001f994 - 0x0001fa14] 128 java class 108 Lcom/stericson/RootTools/InternalMethods$9 :: Lcom/stericson/RootTools/Command; -0x0001f994 java method 0 Cg Lcom/stericson/RootTools/InternalMethods$9.method.(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V +0x0001f994 java method 0 gC Lcom/stericson/RootTools/InternalMethods$9.method.(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V 0x0001f9b4 java method 1 p Lcom/stericson/RootTools/InternalMethods$9.method.output(ILjava/lang/String;)V 0x00004390 java var 0 Pfh Lcom/stericson/RootTools/InternalMethods$9.ifield_val$box:Ljava/lang/String 0x00004398 java var 1 Pfh Lcom/stericson/RootTools/InternalMethods$9.ifield_val$util:Ljava/lang/String @@ -1736,11 +1736,11 @@ EXPECT=<()V @@ -1846,14 +1846,14 @@ EXPECT=<(Ljavax/activation/DataContentHandler;Ljava/lang/Object;Ljava/lang/String;)V @@ -1876,7 +1876,7 @@ EXPECT=<(Lorg/radare/radare2installer/Utils;I[Ljava/lang/String;Ljava/lang/StringBuffer;)V +0x00021210 java method 0 gC Lorg/radare/radare2installer/Utils$1.method.(Lorg/radare/radare2installer/Utils;I[Ljava/lang/String;Ljava/lang/StringBuffer;)V 0x00021230 java method 1 p Lorg/radare/radare2installer/Utils$1.method.output(ILjava/lang/String;)V 0x00004d60 java var 0 fh Lorg/radare/radare2installer/Utils$1.ifield_this$0:Lorg/radare/radare2installer/Utils 0x00004d68 java var 1 fh Lorg/radare/radare2installer/Utils$1.ifield_val$radare_output:Ljava/lang/StringBuffer diff --git a/test/db/formats/dwarf b/test/db/formats/dwarf index 1546ee5a1c..81a89259a7 100644 --- a/test/db/formats/dwarf +++ b/test/db/formats/dwarf @@ -721,26 +721,26 @@ colu: 12 addr: 0x00001149 EOF EXPECT_ERR=< 0x00015660 7100ee010000 invoke-static {}, Lcom/stericson/RootTools/RootTools.isAccessGiven()Z ; 0x1ee ; method.public.static.Lcom_stericson_RootTools_RootTools.Lcom_stericson_RootTools_RootTools.method.isAccessGiven__Z +| ..-> 0x00015660 7100ee010000 invoke-static {}, Lcom/stericson/RootTools/RootTools.isAccessGiven()Z ; 0x1ee ; method.static.public.Lcom_stericson_RootTools_RootTools.Lcom_stericson_RootTools_RootTools.method.isAccessGiven__Z | :: 0x00015666 0a04 move-result v4 | ,===< 0x00015668 39041e00 if-nez v4, 0x000156a4 | |:: 0x0001566c 1a044201 const-string v4, str.ERROR:_No_root_access_to_this_device. ; 0x2c9dd ; "&ERROR: No root access to this device.\n" diff --git a/test/db/tools/rabin2 b/test/db/tools/rabin2 index 3b919d6932..30b6de6e18 100644 --- a/test/db/tools/rabin2 +++ b/test/db/tools/rabin2 @@ -906,7 +906,7 @@ EXPECT=<