mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-25 14:19:51 +00:00
Fix #399 - Add .license to all plugins
This commit is contained in:
parent
0ea6509f03
commit
7d70f79755
@ -17,11 +17,12 @@ static void r_asm_list(RAsm *a) {
|
||||
RAsmPlugin *h;
|
||||
RListIter *iter;
|
||||
r_list_foreach (a->plugins, iter, h) {
|
||||
const char *feat = "---";
|
||||
const char *feat = "--";
|
||||
if (h->assemble && h->disassemble) feat = "ad";
|
||||
if (h->assemble && !h->disassemble) feat = "a_";
|
||||
if (!h->assemble && h->disassemble) feat = "_d";
|
||||
printf ("%s %-11s %s\n", feat, h->name, h->desc);
|
||||
printf ("%s %-11s %s (%s)\n", feat, h->name,
|
||||
h->desc, h->license?h->license:"unknown");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,8 @@ RAsmPlugin r_asm_plugin_8051 = {
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.disassemble = &disassemble,
|
||||
.assemble = NULL
|
||||
.assemble = NULL,
|
||||
.license = "PD"
|
||||
};
|
||||
|
||||
#ifndef CORELIB
|
||||
|
@ -93,7 +93,8 @@ RAsmPlugin r_asm_plugin_arc = {
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.disassemble = &disassemble,
|
||||
.assemble = NULL
|
||||
.assemble = NULL,
|
||||
.license = "GPL3"
|
||||
};
|
||||
|
||||
#ifndef CORELIB
|
||||
|
@ -191,7 +191,8 @@ RAsmPlugin r_asm_plugin_arm = {
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.disassemble = &disassemble,
|
||||
.assemble = &assemble
|
||||
.assemble = &assemble,
|
||||
.license = "GPL3"
|
||||
};
|
||||
|
||||
#ifndef CORELIB
|
||||
|
@ -35,7 +35,8 @@ RAsmPlugin r_asm_plugin_arm_winedbg = {
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.disassemble = &disassemble,
|
||||
.assemble = NULL
|
||||
.assemble = NULL,
|
||||
.license = "LGPL2"
|
||||
};
|
||||
|
||||
#ifndef CORELIB
|
||||
|
@ -18,6 +18,7 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
||||
RAsmPlugin r_asm_plugin_avr = {
|
||||
.name = "avr",
|
||||
.arch = "avr",
|
||||
.license = "BSD",
|
||||
.bits = (int[]){ 16, 32, 0 },
|
||||
.desc = "AVR Atmel disassembler",
|
||||
.init = NULL,
|
||||
|
@ -157,6 +157,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
RAsmPlugin r_asm_plugin_bf = {
|
||||
.name = "bf",
|
||||
.arch = "bf",
|
||||
.license = "LGPL3",
|
||||
.bits = (int[]){32,0},
|
||||
.desc = "Brainfuck disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -16,6 +16,7 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
||||
|
||||
RAsmPlugin r_asm_plugin_c55plus = {
|
||||
.name = "c55+",
|
||||
.license = "LGPL3",
|
||||
.desc = "c55+ disassembly plugin",
|
||||
.arch = "c55+",
|
||||
.bits = (int[]){ 32, 40 },
|
||||
|
@ -36,6 +36,7 @@ static int disassemble(RAsm *a, struct r_asm_op_t *op, const ut8 *buf, int len)
|
||||
RAsmPlugin r_asm_plugin_csr = {
|
||||
.name = "csr",
|
||||
.arch = "csr",
|
||||
.license = "PD",
|
||||
.bits = (int[]){ 16, 0 },
|
||||
.desc = "CSR disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -413,6 +413,7 @@ static int init (void *user) {
|
||||
RAsmPlugin r_asm_plugin_dalvik = {
|
||||
.name = "dalvik",
|
||||
.arch = "dalvik",
|
||||
.license = "LGPL3",
|
||||
.desc = "Dalvik (Android VM) disassembly plugin",
|
||||
.bits = (int[]){ 32, 64, 0 },
|
||||
.init = &init,
|
||||
|
@ -27,6 +27,7 @@ RAsmPlugin r_asm_plugin_dcpu16 = {
|
||||
.arch = "dpcu",
|
||||
.bits = (int[]){ 16, 0 },
|
||||
.desc = "DCPU16 assembler/disassembler",
|
||||
.license = "PD",
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.disassemble = &disassemble,
|
||||
|
@ -23,6 +23,7 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
||||
|
||||
RAsmPlugin r_asm_plugin_ebc = {
|
||||
.name = "ebc",
|
||||
.license = "LGPL3",
|
||||
.desc = "EFI Byte Code disassembly plugin",
|
||||
.arch = "ebc",
|
||||
.bits = (int[]){ 32, 64 },
|
||||
|
@ -14,10 +14,10 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
"gas /dev/stdin -o /dev/stdout <<__\n"
|
||||
"BITS %i\nORG 0x%"PFMT64x"\n%s\n__",
|
||||
a->bits, a->pc, buf);
|
||||
out = (ut8 *)r_sys_cmd_str(cmd, "", &len);
|
||||
out = (ut8 *)r_sys_cmd_str (cmd, "", &len);
|
||||
if (out) {
|
||||
memcpy(op->buf, out, len<=R_ASM_BUFSIZE?len:R_ASM_BUFSIZE);
|
||||
free(out);
|
||||
memcpy (op->buf, out, len<=R_ASM_BUFSIZE?len:R_ASM_BUFSIZE);
|
||||
free (out);
|
||||
}
|
||||
op->inst_len = len;
|
||||
return len;
|
||||
@ -25,6 +25,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
|
||||
RAsmPlugin r_asm_plugin_x86_nasm = {
|
||||
.name = "gas",
|
||||
.license = "LGPL3",
|
||||
.desc = "GNU Assembler plugin",
|
||||
.arch = "x86", // XXX
|
||||
.bits = (int[]){ 16, 32, 64, 0 },
|
||||
|
@ -20,6 +20,7 @@ RAsmPlugin r_asm_plugin_gb = {
|
||||
.name = "gb",
|
||||
.desc = "GB disassembly plugin",
|
||||
.arch = "z80", //?
|
||||
.license = "LGPL3",
|
||||
.bits = (int[]){ 8, 0 }, /* supported wordsizes */
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
|
@ -18,6 +18,7 @@ RAsmPlugin r_asm_plugin_i8080 = {
|
||||
.name = "i8080",
|
||||
.desc = "i8080 disassembler plugin",
|
||||
.arch = "i8080",
|
||||
.license = "BSD",
|
||||
.bits = (int[]){ 8, 0 },
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
|
@ -32,6 +32,7 @@ RAsmPlugin r_asm_plugin_java = {
|
||||
.name = "java",
|
||||
.desc = "Java CLASS assembler/disassembler",
|
||||
.arch = "java",
|
||||
.license = "LGPL3",
|
||||
.bits = (int[]){ 8, 32, 0 },
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
|
@ -33,6 +33,7 @@ static int disassemble(RAsm *a, RAsmOp *aop, const ut8 *buf, int len) {
|
||||
RAsmPlugin r_asm_plugin_m68k = {
|
||||
.name = "m68k",
|
||||
.arch = "m68k",
|
||||
.license = "BSD",
|
||||
.bits = (int[]){ 32, 0 },
|
||||
.desc = "Motorola 68000 disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -95,6 +95,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *str) {
|
||||
RAsmPlugin r_asm_plugin_mips = {
|
||||
.name = "mips",
|
||||
.arch = "mips",
|
||||
.license = "GPL3",
|
||||
.bits = (int[]){ 64, 32, 0 },
|
||||
.desc = "MIPS disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -28,6 +28,7 @@ static int disassemble(RAsm *a, struct r_asm_op_t *op, const ut8 *buf, int len)
|
||||
RAsmPlugin r_asm_plugin_msil = {
|
||||
.name = "msil",
|
||||
.arch = "msil",
|
||||
.license = "PD",
|
||||
.bits = (int[]){ 16, 32, 64, 0 },
|
||||
.desc = "MSIL disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -91,6 +91,7 @@ static int disassemble(RAsm *a, struct r_asm_op_t *op, const ut8 *buf, int len)
|
||||
RAsmPlugin r_asm_plugin_ppc = {
|
||||
.name = "ppc",
|
||||
.arch = "ppc",
|
||||
.license = "GPL3",
|
||||
.bits = (int[]){ 32, 64, 0 },
|
||||
.desc = "PPC disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -21,6 +21,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
RAsmPlugin r_asm_plugin_psosvm = {
|
||||
.name = "psosvm",
|
||||
.desc = "PSOS-VM disassembly plugin",
|
||||
.license = "BSD",
|
||||
.arch = "psosvm",
|
||||
.bits = (int[]){ 8, 16, 0 },
|
||||
.init = NULL,
|
||||
|
@ -24,6 +24,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *str) {
|
||||
RAsmPlugin r_asm_plugin_rar = {
|
||||
.name = "rar",
|
||||
.arch = "rar",
|
||||
.license = "LGPL3",
|
||||
.bits = (int[]){ 1, 0 },
|
||||
.desc = "RAR VM disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -81,6 +81,7 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
||||
RAsmPlugin r_asm_plugin_sh = {
|
||||
.name = "sh",
|
||||
.arch = "sh",
|
||||
.license = "GPL3",
|
||||
.bits = (int[]){ 32, 0 },
|
||||
.desc = "SH-4 disassembly plugin",
|
||||
.init = NULL,
|
||||
|
@ -23,6 +23,7 @@ RAsmPlugin r_asm_plugin_snes = {
|
||||
.bits = (int[]){ 16, 8, 0 }, /* supported wordsizes */
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.license = "LGPL3",
|
||||
.disassemble = &disassemble,
|
||||
.modify = NULL,
|
||||
.assemble = NULL,
|
||||
|
@ -80,6 +80,7 @@ RAsmPlugin r_asm_plugin_sparc = {
|
||||
.name = "sparc",
|
||||
.arch = "sparc",
|
||||
.bits = (int[]){ 32, 64 },
|
||||
.license = "GPL3",
|
||||
.desc = "SPARC disassembly plugin",
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
|
@ -62,8 +62,9 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
||||
|
||||
RAsmPlugin r_asm_plugin_x86 = {
|
||||
.name = "x86",
|
||||
.desc = "udis86 disassembly plugin",
|
||||
.desc = "udis86 disassembler",
|
||||
.arch = "x86",
|
||||
.license = "BSD",
|
||||
.bits = (int[]){ 16, 32, 64, 0 },
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
|
@ -65,6 +65,7 @@ RAsmPlugin r_asm_plugin_x86_as = {
|
||||
.name = "x86.as",
|
||||
.desc = "X86 assembler plugin using 'as' program",
|
||||
.arch = "x86",
|
||||
.license = "LGPL3",
|
||||
// NOTE: 64bits is not supported on OSX's nasm :(
|
||||
.bits = (int[]){ 16, 32, 64, 0 },
|
||||
.init = NULL,
|
||||
|
@ -45,6 +45,7 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
RAsmPlugin r_asm_plugin_x86_nasm = {
|
||||
.name = "x86.nasm",
|
||||
.desc = "X86 nasm assembler plugin",
|
||||
.license = "LGPL3",
|
||||
.arch = "x86",
|
||||
// NOTE: 64bits is not supported on OSX's nasm :(
|
||||
.bits = (int[]){ 16, 32, 64, 0 },
|
||||
|
@ -1018,6 +1018,7 @@ static int assemble(RAsm *a, RAsmOp *ao, const char *str) {
|
||||
RAsmPlugin r_asm_plugin_x86_nz = {
|
||||
.name = "x86.nz",
|
||||
.desc = "x86 assembler with non-zeros",
|
||||
.license = "LGPL3",
|
||||
.arch = "x86",
|
||||
.bits = (int[]){ 32, 64, 0 },
|
||||
.init = NULL,
|
||||
|
@ -42,6 +42,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_op_t *op, const char *buf) {
|
||||
|
||||
RAsmPlugin r_asm_plugin_x86_olly = {
|
||||
.name = "x86.olly",
|
||||
.license = "GPL2",
|
||||
.desc = "X86 disassembly plugin (olly engine)",
|
||||
.arch = "x86",
|
||||
.bits = (int[]){ 32, 0 },
|
||||
|
@ -20,6 +20,7 @@ static int do_disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
||||
|
||||
RAsmPlugin r_asm_plugin_z80 = {
|
||||
.name = "z80",
|
||||
.license = "GPL2 NON-COMMERCIAL",
|
||||
.desc = "z80 assembler plugin",
|
||||
.arch = "z80",
|
||||
.bits = (int[]){ 8, 0 },
|
||||
|
@ -106,6 +106,7 @@ typedef struct r_asm_plugin_t {
|
||||
char *name;
|
||||
char *arch;
|
||||
char *desc;
|
||||
char *license;
|
||||
// TODO: bits -> renamed to bitmask
|
||||
// use each bit to identify 4,8,16,32,64 bitsize it can be a mask, no need for pointers here
|
||||
int *bits;
|
||||
|
@ -193,6 +193,10 @@ public class RAsm {
|
||||
* The plugin description.
|
||||
*/
|
||||
public string desc;
|
||||
/**
|
||||
* The license for the plugin.
|
||||
*/
|
||||
public string license;
|
||||
/**
|
||||
* Supported bit sizes.
|
||||
* Warning, future releases will probably use a bitmask approach instead.
|
||||
|
Loading…
Reference in New Issue
Block a user