Add the missing esil.null plugin

This commit is contained in:
pancake 2023-11-15 18:46:17 +01:00 committed by pancake
parent 25771b3e03
commit a7121abf8c
24 changed files with 65 additions and 5 deletions

View File

@ -172,8 +172,8 @@ MCORE, mcs96, RSP, SuperH-4, VAX, KVX, Am29000, LOONGARCH, JDH8, s390x.
## File Formats
ELF, Mach-O, Fatmach-O, PE, PE+, MZ, COFF, XCOFF, OMF, TE, XBE, SEP64, BIOS/UEFI,
Dyldcache, DEX, ART, CGC, Java class, Android boot image, Plan9 executables,
ZIMG, MBN/SBL bootloader, ELF coredump, MDMP (Windows minidump), PDP11, XTAC,
Dyldcache, DEX, ART, Java class, Android boot image, Plan9 executables, Amiga HUNK,
ZIMG, MBN/SBL bootloader, ELF coredump, MDMP (Windows minidump), PDP11, XTAC, CGC,
WASM (WebAssembly binary), Commodore VICE emulator, QNX, WAD, OFF, TIC-80,
GB/GBA, NDS and N3DS, and mount several filesystems like NTFS, FAT, HFS+, EXT,...

View File

@ -15,6 +15,7 @@ arch.wasm
arch.x86_cs
arch.x86_nz
esil.dummy
esil.null
bin.any
bin.bios
bin.elf

View File

@ -6,6 +6,7 @@ io.default
bin.any
bin.elf
bin.elf64
esil.null
bin.java
bin.dex
bin.le

View File

@ -189,6 +189,7 @@ debug.winkd
egg.exec
egg.xor
esil.dummy
esil.null
fs.ext2
fs.fat
fs.fb

View File

@ -197,6 +197,7 @@ debug.rap
debug.winkd
egg.exec
egg.xor
esil.null
esil.dummy
fs.ext2
fs.fat

View File

@ -57,6 +57,7 @@ debug.native
debug.rap
egg.exec
egg.xor
esil.null
esil.dummy
fs.posix
io.bfdbg

View File

@ -11,6 +11,7 @@ arch.java
arch.mips_cs
arch.null
arch.x86_nz
esil.null
esil.dummy
bin.any
bin.bios

View File

@ -12,6 +12,7 @@ arch.mips_cs
arch.null
arch.x86_cs
arch.x86_nz
esil.null
esil.dummy
bin.any
bin.bios

View File

@ -69,6 +69,7 @@ arch.xtensa
arch.z80
asm.null
bin.any
esil.null
esil.dummy
bin.tic
bin.wasm

View File

@ -55,6 +55,7 @@ arch.xap
arch.xtensa
arch.z80
asm.null
esil.null
esil.dummy
bin.any
bin.s390

View File

@ -28,6 +28,7 @@ arch.ws
arch.x86_nz
arch.xap
arch.xcore_cs
esil.null
esil.dummy
bin.any
bin.bf

View File

@ -42,6 +42,7 @@ arch.propeller
arch.null
arch.i4004
esil.dummy
esil.null
arch.arm
arch.any_as
asm.null

View File

@ -34,6 +34,7 @@ arch.xap
arch.xcore_cs
asm.null
esil.dummy
esil.null
bin.any
bin.nro
bin.nso

View File

@ -44,6 +44,7 @@ arch.x86_nz
arch.xcore_cs
arch.z80
asm.null
esil.null
esil.dummy
bin.any
bin.tic

View File

@ -10,6 +10,7 @@ arch.mips_cs
arch.null
arch.x86_cs
arch.x86_nz
esil.null
esil.dummy
bin.any
bin.bios

View File

@ -5,6 +5,7 @@ arch.x86_cs
arch.x86_nz
bin.any
esil.dummy
esil.null
bin.bios
bin.elf
bin.elf64

View File

@ -16,6 +16,7 @@ arch.wasm
arch.x86_cs
arch.x86_nz
arch.z80
esil.null
esil.dummy
crypto.base64
crypto.xor

View File

@ -4,6 +4,7 @@ r_bp_sources = [
'bp_plugin.c',
'bp_traptrace.c',
'bp_watch.c',
'p/bp_null.c',
'p/bp_arm.c',
'p/bp_bf.c',
'p/bp_mips.c',
@ -22,8 +23,7 @@ r_bp = library('r_bp', r_bp_sources,
soversion: r2_libversion
)
r_bp_dep = declare_dependency(link_with: r_bp,
include_directories: [platform_inc])
r_bp_dep = declare_dependency(link_with: r_bp, include_directories: [platform_inc])
if get_option('blob')
r_bp_static = static_library('r_bp_static', r_bp_sources,

View File

@ -4,6 +4,7 @@ r_esil_sources = [
'esil_plugin.c',
'esil_stats.c',
'esil_trace.c',
'p/esil_null.c',
'p/esil_dummy.c',
]
esil_extra_inc = include_directories('..', '../include')

32
libr/esil/p/esil_null.c Normal file
View File

@ -0,0 +1,32 @@
/* radare2 - LGPL - Copyright 2023 - pancake */
#define R_LOG_ORIGIN "esil.null"
#include <r_lib.h>
#include <r_anal.h>
static void *r_esil_null_init(REsil *esil) {
return NULL;
}
static void r_esil_null_fini(REsil *esil, void *user) {
// do nothing
}
REsilPlugin r_esil_plugin_null = {
.meta = {
.name = "null",
.desc = "null esil plugin",
.license = "MIT",
},
.init = r_esil_null_init,
.fini = r_esil_null_fini
};
#ifndef R2_PLUGIN_INCORE
R_API RLibStruct radare_plugin = {
.type = R_LIB_TYPE_ESIL,
.data = &r_esil_plugin_null,
.version = R2_VERSION
};
#endif

9
libr/esil/p/null.mk Normal file
View File

@ -0,0 +1,9 @@
OBJ_ESIL_NULL=esil_null.o
STATIC_OBJ+=${OBJ_ESIL_NULL}
TARGET_ESIL_NULL=esil_null.${EXT_SO}
ALL_TARGETS+=${TARGET_ESIL_NULL}
${TARGET_ESIL_NULL}: ${OBJ_ESIL_NULL}
${CC} $(call libname,esil_null) ${LDFLAGS} ${CFLAGS} -o esil_null.${EXT_SO} ${OBJ_ESIL_NULL}

View File

@ -174,6 +174,7 @@ extern RBreakpointPlugin r_bp_plugin_mips;
extern RBreakpointPlugin r_bp_plugin_ppc;
extern RBreakpointPlugin r_bp_plugin_sh;
extern RBreakpointPlugin r_bp_plugin_bf;
extern RBreakpointPlugin r_bp_plugin_null;
extern RBreakpointPlugin r_bp_plugin_riscv;
#endif
#ifdef __cplusplus

View File

@ -389,6 +389,7 @@ R_API void r_esil_trace_restore(REsil *esil, int idx);
R_API ut64 r_esil_trace_loopcount(REsilTrace *etrace, ut64 addr);
R_API void r_esil_trace_loopcount_increment(REsilTrace *etrace, ut64 addr);
extern REsilPlugin r_esil_plugin_null;
extern REsilPlugin r_esil_plugin_dummy;
#ifdef __cplusplus

View File

@ -251,7 +251,7 @@ if no_user_plugins
'xbe',
'xcoff64',
'xnu_kernelcache',
'xtac'
'xtac',
'z64',
'zimg',
]