Skip to content

Instantly share code, notes, and snippets.

@c-urly
Last active March 20, 2020 17:10
Show Gist options
  • Save c-urly/7db28e9892fb4f8a6b90c51eef2d3a72 to your computer and use it in GitHub Desktop.
Save c-urly/7db28e9892fb4f8a6b90c51eef2d3a72 to your computer and use it in GitHub Desktop.
#include <string.h>
#include <r_types.h>
#include <r_lib.h>
#include <r_asm.h>
#include <r_anal.h>
#include "../../asm/arch/tricore/gnu/tricore-opc.c"
static int tricore_anop(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int len) {
return 0;
}
static int set_reg_profile(RAnal *anal) {
return 0;
}
static int archinfo(RAnal *anal, int q) {
return 0;
}
struct r_anal_plugin_t r_anal_plugin_tricore = {
.name = "tricore",
.desc = "TRICORE analysis plugin",
.license = "LGPL3",
.arch = "tricore",
.bits = 16 | 32,
.op = &tricore_anop,
.archinfo = archinfo,
.set_reg_profile = set_reg_profile
};
#ifndef R2_PLUGIN_INCORE
R_API RLibStruct radare_plugin = {
.type = R_LIB_TYPE_ANAL,
.data = &r_anal_plugin_tricore,
.version = R2_VERSION
};
#endif
OBJ_TRICORE=anal_tricore.o
STATIC_OBJ+=${OBJ_TRICORE}
TARGET_TRICORE=anal_tricore.${EXT_SO}
ALL_TARGETS+=${TARGET_TRICORE}
${TARGET_TRICORE}: ${OBJ_TRICORE}
${CC} $(call libname, anal_tricore) ${LDFLAGS} ${CFLAGS} \
-o $(TARGET_TRICORE) $(OBJ_TRICORE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment