* Added dummy anal.mips

This commit is contained in:
pancake 2010-06-23 04:02:57 +02:00
parent 5182d9a0fe
commit 33fdb14643
4 changed files with 55 additions and 0 deletions

43
libr/anal/p/anal_mips.c Normal file
View File

@ -0,0 +1,43 @@
/* radare - LGPL - Copyright 2010 - pancake<nopcode.org> */
#include <string.h>
#include <r_types.h>
#include <r_lib.h>
#include <r_asm.h>
#include <r_anal.h>
static int aop(RAnal *anal, RAnalOp *aop, ut64 addr, const ut8 *bytes, int len) {
ut16 lol, ins;
int rel = 0;
if (aop == NULL)
return 4;
memset (aop, 0, sizeof (RAnalOp));
aop->type = R_ANAL_OP_TYPE_UNK;
aop->length = 4;
switch (bytes[0]) {
case 0: // XXX
aop->type = R_ANAL_OP_TYPE_NOP;
break;
default:
break;
}
return aop->length;
}
struct r_anal_plugin_t r_anal_plugin_mips = {
.name = "mips",
.desc = "MIPS code analysis plugin",
.init = NULL,
.fini = NULL,
.aop = &aop
};
#ifndef CORELIB
struct r_lib_struct_t radare_plugin = {
.type = R_LIB_TYPE_ANAL,
.data = &r_anal_plugin_mips
};
#endif

10
libr/anal/p/mips.mk Normal file
View File

@ -0,0 +1,10 @@
OBJ_MIPS=anal_mips.o
STATIC_OBJ+=${OBJ_MIPS}
TARGET_MIPS=anal_mips.${EXT_SO}
ALL_TARGETS+=${TARGET_MIPS}
${TARGET_MIPS}: ${OBJ_MIPS}
${CC} ${CFLAGS} -o anal_mips.${EXT_SO} ${OBJ_MIPS}
@#strip -s anal_mips.${EXT_SO}

View File

@ -355,6 +355,7 @@ extern RAnalPlugin r_anal_plugin_x86;
extern RAnalPlugin r_anal_plugin_x86_x86im;
extern RAnalPlugin r_anal_plugin_ppc;
extern RAnalPlugin r_anal_plugin_java;
extern RAnalPlugin r_anal_plugin_mips;
#endif
#endif

View File

@ -10,6 +10,7 @@ asm.x86_olly
anal.x86
anal.x86_x86im
anal.arm
anal.mips
anal.java
anal.csr
anal.ppc