rizin/librz/analysis/p/analysis_null.c
Florian Märkl 79a17ef482
Remove RzAnalysisPlugin.set_reg_profile (#2091)
Refactored all plugins to use get_reg_profile instead, which simply
returns the register profile instead of applying it as a side-effect.
2021-12-11 10:18:31 +01:00

34 lines
932 B
C

// SPDX-FileCopyrightText: 2014 jn <j.neuschaefer@gmx.net>
// SPDX-FileCopyrightText: 2014 maijin <maijin21@gmail.com>
// SPDX-License-Identifier: LGPL-3.0-only
#include <rz_analysis.h>
#include <rz_types.h>
#include <rz_lib.h>
static int null_analysis(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask) {
/* This should better follow the disassembler */
return op->size = 1;
}
static char *null_get_reg_profile(RzAnalysis *analysis) {
return strdup("");
}
RzAnalysisPlugin rz_analysis_plugin_null = {
.name = "null",
.desc = "Fallback/Null analysis plugin",
.arch = "none",
.license = "LGPL3",
.bits = 8 | 16 | 32 | 64, /* is this used? */
.op = &null_analysis,
.get_reg_profile = &null_get_reg_profile,
};
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_null,
.version = RZ_VERSION
};
#endif