static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) { //void *cp; RBinJavaObj *obj = NULL; RBin *b = a->binb.bin; if (b->cur.curplugin) { if (!strcmp (b->cur.curplugin->name, "java")) { // XXX slow obj = b->cur.bin_obj; //o; if (obj) r_java_set_obj (obj); } } return op->size = r_java_disasm (a->pc, buf, op->buf_asm, sizeof (op->buf_asm)); }
static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) { //void *cp; RBinJavaObj *obj = NULL; RBin *bin = a->binb.bin; RBinPlugin *plugin = bin && bin->cur && bin->cur->o ? bin->cur->o->plugin : NULL; if (plugin) { if (!strcmp (plugin->name, "java")) { // XXX slow obj = bin->cur->o->bin_obj; //o; //eprintf("Handling: %s disasm.\n", b->cur.file); } } op->size = r_java_disasm (obj, a->pc, buf, len, op->buf_asm, sizeof (op->buf_asm)); return op->size; }
static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, ut64 len) { void *cp; RBinJavaObj *obj = NULL; RBin *b = a->binb.bin; if (!strcmp (b->cur.curplugin->name, "java")) { // XXX slow obj = b->cur.bin_obj; //o; if (obj) r_java_setcp (obj->cp_items, obj->cf.cp_count); } // XXX: crossmodule dependency // TODO: get class info from rbin if loaded #if 0 RCore *core = (RCore*)a->user; if (core && core->file && lastfile != core->file->filename) { lastfile = core->file->filename; java_classdump (lastfile, 0); } else javasm_init (); #endif return op->inst_len = r_java_disasm (a->pc, buf, op->buf_asm, sizeof (op->buf_asm)); }