summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-07 21:04:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-07 21:04:46 (GMT)
commit648bf475951e6d588d13539441d8a0e54eab2706 (patch)
treeb654558a0c6bb4bc9d15eb9d65c124acb8a3522a /src/arch
parentc980546e8bca6f1c0c340634a4c3640e14fd1228 (diff)
Moved some core features into plugins.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/Makefile.am8
-rw-r--r--src/arch/jvm/Makefile.am35
-rw-r--r--src/arch/jvm/instruction.c299
-rw-r--r--src/arch/jvm/instruction.h151
-rw-r--r--src/arch/jvm/op_add.c55
-rw-r--r--src/arch/jvm/op_const.c87
-rw-r--r--src/arch/jvm/op_convert.c433
-rw-r--r--src/arch/jvm/op_dup.c190
-rw-r--r--src/arch/jvm/op_getput.c62
-rw-r--r--src/arch/jvm/op_invoke.c128
-rw-r--r--src/arch/jvm/op_load.c92
-rw-r--r--src/arch/jvm/op_monitor.c82
-rw-r--r--src/arch/jvm/op_nop.c55
-rw-r--r--src/arch/jvm/op_pop.c82
-rw-r--r--src/arch/jvm/op_ret.c184
-rw-r--r--src/arch/jvm/op_store.c60
-rw-r--r--src/arch/jvm/opcodes.h160
-rw-r--r--src/arch/jvm/operand.c325
-rw-r--r--src/arch/jvm/operand.h109
-rw-r--r--src/arch/jvm/processor.c400
-rw-r--r--src/arch/jvm/processor.h55
21 files changed, 0 insertions, 3052 deletions
diff --git a/src/arch/Makefile.am b/src/arch/Makefile.am
index 4c15349..ce5db57 100644
--- a/src/arch/Makefile.am
+++ b/src/arch/Makefile.am
@@ -29,13 +29,6 @@ libarch_la_SOURCES = \
undefined.h undefined.c \
vmpa.h vmpa.c
-# libarch_la_LIBADD = \
-# arm/libarcharm.la \
-# dalvik/libarchdalvik.la \
-# jvm/libarchjvm.la \
-# mips/libarchmips.la \
-# x86/libarchx86.la
-
libarch_la_LIBADD = \
operands/libarchoperands.la
@@ -52,5 +45,4 @@ AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-#SUBDIRS = arm dalvik jvm mips x86
SUBDIRS = operands
diff --git a/src/arch/jvm/Makefile.am b/src/arch/jvm/Makefile.am
deleted file mode 100644
index fc4ee0b..0000000
--- a/src/arch/jvm/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-
-noinst_LTLIBRARIES = libarchjvm.la
-
-libarchjvm_la_SOURCES = \
- instruction.h instruction.c \
- op_add.c \
- op_const.c \
- op_convert.c \
- op_dup.c \
- op_getput.c \
- op_invoke.c \
- op_load.c \
- op_monitor.c \
- op_nop.c \
- op_pop.c \
- op_store.c \
- op_ret.c \
- opcodes.h \
- operand.h operand.c \
- processor.h processor.c
-
-libarchjvm_la_CFLAGS = $(AM_CFLAGS)
-
-
-devdir = $(includedir)/chrysalide/$(subdir:src/%=%)
-
-dev_HEADERS = $(libarchjvm_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-
-SUBDIRS =
diff --git a/src/arch/jvm/instruction.c b/src/arch/jvm/instruction.c
deleted file mode 100644
index c7a9bfb..0000000
--- a/src/arch/jvm/instruction.c
+++ /dev/null
@@ -1,299 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * instruction.c - gestion des instructions JVM
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "instruction.h"
-
-
-#include "../instruction-int.h"
-
-
-
-/* Définition générique d'une instruction d'architecture JVM (instance) */
-struct _GJvmInstruction
-{
- GArchInstruction parent; /* A laisser en premier */
-
- JvmOpcodes type; /* Position dans la liste */
-
-};
-
-/* Définition générique d'une instruction d'architecture JVM (classe) */
-struct _GJvmInstructionClass
-{
- GArchInstructionClass parent; /* A laisser en premier */
-
-};
-
-
-/* Initialise la classe des instructions pour JVM. */
-static void g_jvm_instruction_class_init(GJvmInstructionClass *);
-
-/* Initialise une instance d'opérande d'architecture JVM. */
-static void g_jvm_instruction_init(GJvmInstruction *);
-
-
-
-/* --------------------- AIDE A LA MISE EN PLACE D'INSTRUCTIONS --------------------- */
-
-
-/* Répertoire de toutes les instructions JVM */
-typedef struct _jvm_instruction
-{
- bool care_of_data; /* Devinette = repas ? */
- bool can_wide; /* Instruction étendue ? */
- bin_t opcode; /* Opcode de l'instruction */
-
- const char *keyword; /* Mot clef de la commande */
-
-} jvm_instruction;
-
-
-static jvm_instruction _instructions[JOP_COUNT] = {
-
- [JOP_NOP] = { false, false, 0x00, "nop" },
- [JOP_ACONST_NULL] = { false, false, 0x01, "aconst_null" },
- [JOP_ICONST_M1] = { true, false, 0x02, "iconst_m1" },
- [JOP_ICONST_0] = { true, false, 0x03, "iconst_0" },
- [JOP_ICONST_1] = { true, false, 0x04, "iconst_1" },
- [JOP_ICONST_2] = { true, false, 0x05, "iconst_2" },
- [JOP_ICONST_3] = { true, false, 0x06, "iconst_3" },
- [JOP_ICONST_4] = { true, false, 0x07, "iconst_4" },
- [JOP_ICONST_5] = { true, false, 0x08, "iconst_5" },
-
-
-
- [JOP_POP] = { false, false, 0x57, "pop" },
- [JOP_POP2] = { false, false, 0x58, "pop2" },
- [JOP_DUP] = { false, false, 0x59, "dup" },
- [JOP_DUP_X1] = { false, false, 0x5a, "dup_x1" },
- [JOP_DUP_X2] = { false, false, 0x5b, "dup_x2" },
- [JOP_DUP2] = { false, false, 0x5c, "dup2" },
- [JOP_DUP2_X1] = { false, false, 0x5d, "dup2_x1" },
- [JOP_DUP2_X2] = { false, false, 0x5e, "dup2_x2" },
-
-
- [JOP_IADD] = { false, false, 0x60, "iadd" },
-
-
- [JOP_I2L] = { false, false, 0x85, "i2l" },
- [JOP_I2F] = { false, false, 0x86, "i2f" },
- [JOP_I2D] = { false, false, 0x87, "i2d" },
- [JOP_L2I] = { false, false, 0x88, "l2i" },
- [JOP_L2F] = { false, false, 0x89, "l2f" },
- [JOP_L2D] = { false, false, 0x8a, "l2d" },
- [JOP_F2I] = { false, false, 0x8b, "f2i" },
- [JOP_F2L] = { false, false, 0x8c, "f2l" },
- [JOP_F2D] = { false, false, 0x8d, "f2d" },
- [JOP_D2I] = { false, false, 0x8e, "d2i" },
- [JOP_D2L] = { false, false, 0x8f, "d2l" },
- [JOP_D2F] = { false, false, 0x90, "d2f" },
- [JOP_I2B] = { false, false, 0x91, "i2b" },
- [JOP_I2C] = { false, false, 0x92, "i2c" },
- [JOP_I2S] = { false, false, 0x93, "i2s" },
-
-
- [JOP_ILOAD_0] = { true, false, 0x1a, "iload_0" },
- [JOP_ILOAD_1] = { true, false, 0x1b, "iload_1" },
- [JOP_ILOAD_2] = { true, false, 0x1c, "iload_2" },
- [JOP_ILOAD_3] = { true, false, 0x1d, "iload_3" },
-
-
-
- [JOP_ALOAD_0] = { true, false, 0x2a, "aload_0" },
- [JOP_ALOAD_1] = { true, false, 0x2b, "aload_1" },
- [JOP_ALOAD_2] = { true, false, 0x2c, "aload_2" },
- [JOP_ALOAD_3] = { true, false, 0x2d, "aload_3" },
-
- [JOP_ISTORE_0] = { true, false, 0x3b, "istore_0" },
- [JOP_ISTORE_1] = { true, false, 0x3c, "istore_1" },
- [JOP_ISTORE_2] = { true, false, 0x3d, "istore_2" },
- [JOP_ISTORE_3] = { true, false, 0x3e, "istore_3" },
-
- [JOP_IRETURN] = { false, false, 0xac, "ireturn" },
- [JOP_LRETURN] = { false, false, 0xad, "lreturn" },
- [JOP_FRETURN] = { false, false, 0xae, "freturn" },
- [JOP_DRETURN] = { false, false, 0xaf, "dreturn" },
- [JOP_ARETURN] = { false, false, 0xb0, "areturn" },
- [JOP_RETURN] = { false, false, 0xb1, "return" },
- [JOP_GETSTATIC] = { false, false, 0xb2, "getstatic" },
-
- [JOP_INVOKE_VIRTUAL] = { false, false, 0xb6, "invokevirtual" },
- [JOP_INVOKE_SPECIAL] = { false, false, 0xb7, "invokespecial" },
- [JOP_INVOKE_STATIC] = { false, false, 0xb8, "invokestatic" },
-
-
- [JOP_MONITOR_ENTER] = { false, false, 0xc2, "monitorenter" },
- [JOP_MONITOR_EXIT] = { false, false, 0xc3, "monitorexit" }
-
-
-
-};
-
-
-/* Traduit une instruction en version humainement lisible. */
-static const char *jvm_get_instruction_text(const GJvmInstruction *, const GExeFormat *);
-
-
-
-
-
-
-/* Indique le type défini pour une instruction d'architecture JVM. */
-G_DEFINE_TYPE(GJvmInstruction, g_jvm_instruction, G_TYPE_ARCH_INSTRUCTION);
-
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe à initialiser. *
-* *
-* Description : Initialise la classe des instructions pour JVM. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_instruction_class_init(GJvmInstructionClass *klass)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : instr = instance à initialiser. *
-* *
-* Description : Initialise une instance d'instruction d'architecture JVM. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_instruction_init(GJvmInstruction *instr)
-{
- GArchInstruction *parent; /* Instance parente */
-
- parent = G_ARCH_INSTRUCTION(instr);
-
- //parent->get_text = (get_instruction_text_fc)jvm_get_instruction_text;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : type = type d'instruction à représenter. *
-* *
-* Description : Crée une instruction pour l'architecture JVM. *
-* *
-* Retour : Architecture mise en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *g_jvm_instruction_new(JvmOpcodes type)
-{
- GArchInstruction *result; /* Structure à retourner */
-
- result = g_object_new(G_TYPE_JVM_INSTRUCTION, NULL);
-
- G_JVM_INSTRUCTION(result)->type = type;
-
- return result;
-
-}
-
-
-
-/* ---------------------------------------------------------------------------------- */
-/* AIDE A LA MISE EN PLACE D'INSTRUCTIONS */
-/* ---------------------------------------------------------------------------------- */
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. *
-* len = taille totale des données à analyser. *
-* wide = étendue de la future instruction. [OUT] *
-* care = la lecture de l'instr. veut-elle les opcodes ? [OUT] *
-* *
-* Description : Recherche l'identifiant de la prochaine instruction. *
-* *
-* Retour : Identifiant de la prochaine instruction à tenter de charger. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-JvmOpcodes jvm_guess_next_instruction(const bin_t *data, off_t pos, off_t len, bool *wide, bool *care)
-{
- JvmOpcodes result; /* Identifiant à retourner */
- bin_t opcode; /* Opcode à trouver */
-
- *wide = (data[pos] == 0xc4);
-
- if (*wide && (pos + 1) == len) return JOP_COUNT;
-
- opcode = data[pos + (*wide ? 1 : 0)];
-
- for (result = 0; result < JOP_COUNT; result++)
- {
- if (*wide && !_instructions[result].can_wide) continue;
-
- if (_instructions[result].opcode == opcode)
- {
- *care = _instructions[result].care_of_data;
- break;
- }
-
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : instr = instruction à traiter. *
-* format = format du binaire manipulé. *
-* *
-* Description : Traduit une instruction en version humainement lisible. *
-* *
-* Retour : Chaîne de caractères à libérer de la mémoire. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static const char *jvm_get_instruction_text(const GJvmInstruction *instr, const GExeFormat *format)
-{
- return _instructions[instr->type].keyword;
-
-}
diff --git a/src/arch/jvm/instruction.h b/src/arch/jvm/instruction.h
deleted file mode 100644
index 8ec9c48..0000000
--- a/src/arch/jvm/instruction.h
+++ /dev/null
@@ -1,151 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * instruction.h - prototypes pour la gestion des instructions JVM
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _ARCH_JVM_INSTRUCTION_H
-#define _ARCH_JVM_INSTRUCTION_H
-
-
-#include "../instruction.h"
-
-
-
-
-
-/* Enumération de tous les opcodes */
-typedef enum _JvmOpcodes
-{
- JOP_NOP, /* nop (0x00) */
- JOP_ACONST_NULL, /* aconst_null (0x01) */
- JOP_ICONST_M1, /* iconst_m1 (0x02) */
- JOP_ICONST_0, /* iconst_0 (0x03) */
- JOP_ICONST_1, /* iconst_1 (0x04) */
- JOP_ICONST_2, /* iconst_2 (0x05) */
- JOP_ICONST_3, /* iconst_3 (0x06) */
- JOP_ICONST_4, /* iconst_4 (0x07) */
- JOP_ICONST_5, /* iconst_5 (0x08) */
-
-
- JOP_POP, /* pop (0x57) */
- JOP_POP2, /* pop2 (0x58) */
- JOP_DUP, /* dup (0x59) */
- JOP_DUP_X1, /* dup_x1 (0x5a) */
- JOP_DUP_X2, /* dup_x2 (0x5b) */
- JOP_DUP2, /* dup2 (0x5c) */
- JOP_DUP2_X1, /* dup2_x1 (0x5d) */
- JOP_DUP2_X2, /* dup2_x2 (0x5e) */
-
-
- JOP_IADD, /* iadd (0x60) */
-
-
- JOP_I2L, /* i2l (0x85) */
- JOP_I2F, /* i2f (0x86) */
- JOP_I2D, /* i2d (0x87) */
- JOP_L2I, /* l2i (0x88) */
- JOP_L2F, /* l2f (0x89) */
- JOP_L2D, /* l2d (0x8a) */
- JOP_F2I, /* f2i (0x8b) */
- JOP_F2L, /* f2l (0x8c) */
- JOP_F2D, /* f2d (0x8d) */
- JOP_D2I, /* d2i (0x8e) */
- JOP_D2L, /* d2l (0x8f) */
- JOP_D2F, /* d2f (0x90) */
- JOP_I2B, /* i2b (0x91) */
- JOP_I2C, /* i2c (0x92) */
- JOP_I2S, /* i2s (0x93) */
-
-
-
-
- JOP_ILOAD_0, /* iload_0 (0x1a) */
- JOP_ILOAD_1, /* iload_1 (0x1b) */
- JOP_ILOAD_2, /* iload_2 (0x1c) */
- JOP_ILOAD_3, /* iload_3 (0x1d) */
-
-
-
-
- JOP_ALOAD_0, /* aload_0 (0x2a) */
- JOP_ALOAD_1, /* aload_1 (0x2b) */
- JOP_ALOAD_2, /* aload_2 (0x2c) */
- JOP_ALOAD_3, /* aload_3 (0x2d) */
-
-
- JOP_ISTORE_0, /* istore_0 (0x3b) */
- JOP_ISTORE_1, /* istore_1 (0x3c) */
- JOP_ISTORE_2, /* istore_2 (0x3d) */
- JOP_ISTORE_3, /* istore_3 (0x3e) */
-
-
- JOP_IRETURN, /* ireturn (0xac) */
- JOP_LRETURN, /* lreturn (0xad) */
- JOP_FRETURN, /* freturn (0xae) */
- JOP_DRETURN, /* dreturn (0xaf) */
- JOP_ARETURN, /* areturn (0xb0) */
- JOP_RETURN, /* return (0xb1) */
- JOP_GETSTATIC, /* getstatic (0xb2) */
-
- JOP_INVOKE_VIRTUAL, /* invokevirtual (0xb6) */
- JOP_INVOKE_SPECIAL, /* invokespecial (0xb7) */
- JOP_INVOKE_STATIC, /* invokestatic (0xb8) */
-
- JOP_MONITOR_ENTER, /* monitorenter (0xc2) */
- JOP_MONITOR_EXIT, /* monitorexit (0xc3) */
-
- JOP_COUNT
-
-} JvmOpcodes;
-
-
-#define G_TYPE_JVM_INSTRUCTION g_jvm_instruction_get_type()
-#define G_JVM_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_JVM_INSTRUCTION, GJvmInstruction))
-#define G_IS_JVM_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_JVM_INSTRUCTION))
-#define G_JVM_INSTRUCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_JVM_INSTRUCTION, GJvmInstructionClass))
-#define G_IS_JVM_INSTRUCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_JVM_INSTRUCTION))
-#define G_JVM_INSTRUCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_JVM_INSTRUCTION, GJvmInstructionClass))
-
-
-/* Définition générique d'une instruction d'architecture JVM (instance) */
-typedef struct _GJvmInstruction GJvmInstruction;
-
-/* Définition générique d'une instruction d'architecture JVM (classe) */
-typedef struct _GJvmInstructionClass GJvmInstructionClass;
-
-
-/* Indique le type défini pour une instruction d'architecture JVM. */
-GType g_jvm_instruction_get_type(void);
-
-/* Crée une instruction pour l'architecture JVM. */
-GArchInstruction *g_jvm_instruction_new(JvmOpcodes);
-
-
-
-/* --------------------- AIDE A LA MISE EN PLACE D'INSTRUCTIONS --------------------- */
-
-
-/* Recherche l'identifiant de la prochaine instruction. */
-JvmOpcodes jvm_guess_next_instruction(const bin_t *, off_t, off_t, bool *, bool *);
-
-
-
-#endif /* _ARCH_JVM_INSTRUCTION_H */
diff --git a/src/arch/jvm/op_add.c b/src/arch/jvm/op_add.c
deleted file mode 100644
index fbcc682..0000000
--- a/src/arch/jvm/op_add.c
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_add.c - décodage des additions
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'iadd'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_iadd(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_IADD);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_const.c b/src/arch/jvm/op_const.c
deleted file mode 100644
index fc7075c..0000000
--- a/src/arch/jvm/op_const.c
+++ /dev/null
@@ -1,87 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_const.c - décodage des empilements de valeurs prédéfinies
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'aconst_null'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_aconst_null(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_ACONST_NULL);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'iconst_n'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_iconst_n(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
- JvmOpcodes opcode; /* Instruction effective */
-
- opcode = JOP_ICONST_M1 + (data[*pos] - 0x02);
-
- (*pos)++;
-
- result = g_jvm_instruction_new(opcode);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_convert.c b/src/arch/jvm/op_convert.c
deleted file mode 100644
index 43d9d20..0000000
--- a/src/arch/jvm/op_convert.c
+++ /dev/null
@@ -1,433 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_convert.c - décodage des conversions entre types de base
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'd2f'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_d2f(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_D2F);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'd2i'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_d2i(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_D2I);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'd2l'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_d2l(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_D2L);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'f2d'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_f2d(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_F2D);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'f2i'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_f2i(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_F2I);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'f2l'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_f2l(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_F2L);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'i2b'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_i2b(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_I2B);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'i2c'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_i2c(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_I2C);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'i2d'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_i2d(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_I2D);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'i2f'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_i2f(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_I2F);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'i2l'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_i2l(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_I2L);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'i2s'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_i2s(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_I2S);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'l2d'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_l2d(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_L2D);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'l2i'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_l2i(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_L2I);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'l2f'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_l2f(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_L2F);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_dup.c b/src/arch/jvm/op_dup.c
deleted file mode 100644
index a42acd8..0000000
--- a/src/arch/jvm/op_dup.c
+++ /dev/null
@@ -1,190 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_dup.c - décodage des duplications d'étages de la pile
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'dup'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_dup(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_DUP);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'dup_x1'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_dup_x1(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_DUP_X1);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'dup_x2'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_dup_x2(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_DUP_X2);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'dup2'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_dup2(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_DUP2);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'dup2_x1'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_dup2_x1(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_DUP2_X1);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'dup2_x2'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_dup2_x2(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_DUP2_X2);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_getput.c b/src/arch/jvm/op_getput.c
deleted file mode 100644
index c4d2b26..0000000
--- a/src/arch/jvm/op_getput.c
+++ /dev/null
@@ -1,62 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_getput.c - décodage des fonctions (get|put)*
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-#include "operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'getstatic'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_getstatic(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_GETSTATIC);
-
- if (!jvm_read_one_operand(result, data, pos, len, JOT_FIELD_REF))
- {
- /*free(result); FIXME */
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_invoke.c b/src/arch/jvm/op_invoke.c
deleted file mode 100644
index 118f3a5..0000000
--- a/src/arch/jvm/op_invoke.c
+++ /dev/null
@@ -1,128 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_invoke.c - décodage des fonctions (get|put)*
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-#include "operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'invokespecial'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_invokespecial(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_INVOKE_SPECIAL);
-
- if (!jvm_read_one_operand(result, data, pos, len, JOT_METHOD_REF))
- {
- /*free(result); FIXME */
- return NULL;
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'invokestatic'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_invokestatic(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_INVOKE_STATIC);
-
- if (!jvm_read_one_operand(result, data, pos, len, JOT_METHOD_REF))
- {
- /*free(result); FIXME */
- return NULL;
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'invokevirtual'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_invokevirtual(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_INVOKE_VIRTUAL);
-
- if (!jvm_read_one_operand(result, data, pos, len, JOT_METHOD_REF))
- {
- /*free(result); FIXME */
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_load.c b/src/arch/jvm/op_load.c
deleted file mode 100644
index faea478..0000000
--- a/src/arch/jvm/op_load.c
+++ /dev/null
@@ -1,92 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_load.c - décodage des instructions de chargement
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'aload_n'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_aload_n(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
- JvmOpcodes opcode; /* Instruction effective */
-
- opcode = JOP_ALOAD_0 + (data[*pos] - 0x2a);
-
- (*pos)++;
-
- result = g_jvm_instruction_new(opcode);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'iload_n'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_iload_n(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
- JvmOpcodes opcode; /* Instruction effective */
-
- opcode = JOP_ILOAD_0 + (data[*pos] - 0x1a);
-
- (*pos)++;
-
- result = g_jvm_instruction_new(opcode);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_monitor.c b/src/arch/jvm/op_monitor.c
deleted file mode 100644
index 3e0b61a..0000000
--- a/src/arch/jvm/op_monitor.c
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_monitor.c - décodage des outils pour réaliser des sémaphores sur les objets
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'monitorenter'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_monitorenter(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_MONITOR_ENTER);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'monitorexit'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_monitorexit(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_MONITOR_EXIT);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_nop.c b/src/arch/jvm/op_nop.c
deleted file mode 100644
index ff2f58b..0000000
--- a/src/arch/jvm/op_nop.c
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_nop.c - décodage des absences d'opération
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'nop'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_nop(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_NOP);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_pop.c b/src/arch/jvm/op_pop.c
deleted file mode 100644
index a9f98f1..0000000
--- a/src/arch/jvm/op_pop.c
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_pop.c - décodage des dépilements de pile dans le vide
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'pop'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_pop(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_POP);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'pop2'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_pop2(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_POP);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_ret.c b/src/arch/jvm/op_ret.c
deleted file mode 100644
index 6ab6df3..0000000
--- a/src/arch/jvm/op_ret.c
+++ /dev/null
@@ -1,184 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_ret.c - décodage des ordres de retour
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'areturn'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_areturn(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_ARETURN);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'dreturn'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_dreturn(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_DRETURN);
-
- return result;
-
-}
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'freturn'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_freturn(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_FRETURN);
-
- return result;
-
-}
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'ireturn'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_ireturn(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_IRETURN);
-
- return result;
-
-}
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'lreturn'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_lreturn(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_LRETURN);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'return'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_return(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
-
- result = g_jvm_instruction_new(JOP_RETURN);
-
- return result;
-
-}
diff --git a/src/arch/jvm/op_store.c b/src/arch/jvm/op_store.c
deleted file mode 100644
index 1804049..0000000
--- a/src/arch/jvm/op_store.c
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * op_store.c - décodage des instructions d'enregistrement
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "instruction.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* proc = architecture ciblée par le désassemblage. *
-* *
-* Description : Décode une instruction de type 'istore_n'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *jvm_read_instr_istore_n(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GJvmProcessor *proc)
-{
- GArchInstruction *result; /* Instruction à retourner */
- JvmOpcodes opcode; /* Instruction effective */
-
- opcode = JOP_ISTORE_0 + (data[*pos] - 0x3b);
-
- (*pos)++;
-
- result = g_jvm_instruction_new(opcode);
-
- return result;
-
-}
diff --git a/src/arch/jvm/opcodes.h b/src/arch/jvm/opcodes.h
deleted file mode 100644
index 7251fed..0000000
--- a/src/arch/jvm/opcodes.h
+++ /dev/null
@@ -1,160 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * opcodes.h - prototypes pour la liste de tous les opcodes de l'architecture JVM
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _ARCH_JVM_OPCODES_H
-#define _ARCH_JVM_OPCODES_H
-
-
-#include "processor.h"
-
-
-
-/* Décode une instruction de type 'aconst_null'. */
-GArchInstruction *jvm_read_instr_aconst_null(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'aload_n'. */
-GArchInstruction *jvm_read_instr_aload_n(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'areturn'. */
-GArchInstruction *jvm_read_instr_areturn(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'd2f'. */
-GArchInstruction *jvm_read_instr_d2f(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'd2i'. */
-GArchInstruction *jvm_read_instr_d2i(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'd2l'. */
-GArchInstruction *jvm_read_instr_d2l(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'dreturn'. */
-GArchInstruction *jvm_read_instr_dreturn(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'dup'. */
-GArchInstruction *jvm_read_instr_dup(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'dup_x1'. */
-GArchInstruction *jvm_read_instr_dup_x1(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'dup_x2'. */
-GArchInstruction *jvm_read_instr_dup_x2(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'dup2'. */
-GArchInstruction *jvm_read_instr_dup2(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'dup2_x1'. */
-GArchInstruction *jvm_read_instr_dup2_x1(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'dup2_x2'. */
-GArchInstruction *jvm_read_instr_dup2_x2(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'f2d'. */
-GArchInstruction *jvm_read_instr_f2d(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'f2i'. */
-GArchInstruction *jvm_read_instr_f2i(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'f2l'. */
-GArchInstruction *jvm_read_instr_f2l(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'freturn'. */
-GArchInstruction *jvm_read_instr_freturn(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'getstatic'. */
-GArchInstruction *jvm_read_instr_getstatic(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'i2b'. */
-GArchInstruction *jvm_read_instr_i2b(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'i2c'. */
-GArchInstruction *jvm_read_instr_i2c(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'i2d'. */
-GArchInstruction *jvm_read_instr_i2d(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'i2f'. */
-GArchInstruction *jvm_read_instr_i2f(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'i2l'. */
-GArchInstruction *jvm_read_instr_i2l(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'i2s'. */
-GArchInstruction *jvm_read_instr_i2s(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'iadd'. */
-GArchInstruction *jvm_read_instr_iadd(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'iconst_n'. */
-GArchInstruction *jvm_read_instr_iconst_n(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'iload_n'. */
-GArchInstruction *jvm_read_instr_iload_n(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'invokespecial'. */
-GArchInstruction *jvm_read_instr_invokespecial(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'invokestatic'. */
-GArchInstruction *jvm_read_instr_invokestatic(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'invokevirtual'. */
-GArchInstruction *jvm_read_instr_invokevirtual(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'istore_n'. */
-GArchInstruction *jvm_read_instr_istore_n(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'ireturn'. */
-GArchInstruction *jvm_read_instr_ireturn(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'lreturn'. */
-GArchInstruction *jvm_read_instr_lreturn(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'l2d'. */
-GArchInstruction *jvm_read_instr_l2d(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'l2i'. */
-GArchInstruction *jvm_read_instr_l2i(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'l2f'. */
-GArchInstruction *jvm_read_instr_l2f(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'monitorenter'. */
-GArchInstruction *jvm_read_instr_monitorenter(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'monitorexit'. */
-GArchInstruction *jvm_read_instr_monitorexit(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'nop'. */
-GArchInstruction *jvm_read_instr_nop(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'pop'. */
-GArchInstruction *jvm_read_instr_pop(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'pop2'. */
-GArchInstruction *jvm_read_instr_pop2(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-/* Décode une instruction de type 'return'. */
-GArchInstruction *jvm_read_instr_return(const bin_t *, off_t *, off_t, vmpa_t, const GJvmProcessor *);
-
-
-
-#endif /* _ARCH_JVM_OPCODES_H */
diff --git a/src/arch/jvm/operand.c b/src/arch/jvm/operand.c
deleted file mode 100644
index 4168bcf..0000000
--- a/src/arch/jvm/operand.c
+++ /dev/null
@@ -1,325 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * operand.c - gestion des operandes de l'architecture JVM
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "operand.h"
-
-
-#include "../operand-int.h"
-#include "../../common/endianness.h"
-#include "../../format/java/pool.h"
-
-
-#include "../../format/exe_format.h" /* FIXME : remme */
-
-
-/* ---------------------- COQUILLE VIDE POUR LES OPERANDES JVM ---------------------- */
-
-
-/* Définition d'un opérande de la JVM (instance) */
-struct _GJvmOperand
-{
- GArchOperand parent; /* Instance parente */
-
-};
-
-
-/* Définition d'un opérande de la JVM (classe) */
-struct _GJvmOperandClass
-{
- GArchOperandClass parent; /* Classe parente */
-
-};
-
-
-/* Initialise la classe des opérandes JVM de base. */
-static void g_jvm_operand_class_init(GJvmOperandClass *);
-
-/* Initialise une instance d'opérande de base pour la JVM. */
-static void g_jvm_operand_init(GJvmOperand *);
-
-
-
-/* --------------------- OPERANDES RENVOYANT VERS UNE REFERENCE --------------------- */
-
-
-/* Définition d'un opérande de référence de la JVM (instance) */
-struct _GJvmRefOperand
-{
- GJvmOperand parent; /* Instance parente */
-
- JvmOperandType type; /* Type de référence attendue */
- uint16_t index; /* Indice dans la table Java */
-
-};
-
-
-/* Définition d'un opérande de référence de la JVM (classe) */
-struct _GJvmRefOperandClass
-{
- GJvmOperandClass parent; /* Classe parente */
-
-};
-
-
-/* Initialise la classe des opérandes de référence JVM. */
-static void g_jvm_ref_operand_class_init(GJvmRefOperandClass *);
-
-/* Initialise une instance d'opérande de référence pour la JVM. */
-static void g_jvm_ref_operand_init(GJvmRefOperand *);
-
-
-
-
-
-
-
-/* ---------------------------------------------------------------------------------- */
-/* COQUILLE VIDE POUR LES OPERANDES JVM */
-/* ---------------------------------------------------------------------------------- */
-
-
-/* Indique le type défini par la GLib pour un opérande de JVM. */
-G_DEFINE_TYPE(GJvmOperand, g_jvm_operand, G_TYPE_ARCH_OPERAND);
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe à initialiser. *
-* *
-* Description : Initialise la classe des opérandes JVM de base. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_operand_class_init(GJvmOperandClass *klass)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = instance à initialiser. *
-* *
-* Description : Initialise une instance d'opérande de base pour la JVM. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_operand_init(GJvmOperand *operand)
-{
-
-}
-
-
-
-
-
-
-
-
-/* ---------------------------------------------------------------------------------- */
-/* OPERANDES RENVOYANT VERS UNE REFERENCE */
-/* ---------------------------------------------------------------------------------- */
-
-
-/* Indique le type défini par la GLib pour un opérande de référence de JVM. */
-G_DEFINE_TYPE(GJvmRefOperand, g_jvm_ref_operand, G_TYPE_JVM_OPERAND);
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe à initialiser. *
-* *
-* Description : Initialise la classe des opérandes de référence JVM. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_ref_operand_class_init(GJvmRefOperandClass *klass)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : proc = instance à initialiser. *
-* *
-* Description : Initialise une instance d'opérande de référence pour la JVM. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_ref_operand_init(GJvmRefOperand *operand)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* type = type de l'opérande. *
-* *
-* Description : Crée un opérande de référence pour la JVM. *
-* *
-* Retour : Opérande mis en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchOperand *g_jvm_ref_operand_new(const bin_t *data, off_t *pos, off_t len, JvmOperandType type)
-{
- GJvmRefOperand *result; /* Structure à retourner */
- uint16_t index; /* Indice dans la table Java */
-
- if (!read_u16(&index, data, pos, len, SRE_BIG))
- result = NULL;
-
- else
- {
- result = g_object_new(G_TYPE_JVM_REF_OPERAND, NULL);
-
- /* FIXME : faire attention au type */
-
- result->type = type;
- result->index = index;
-
- }
-
- return G_ARCH_OPERAND(result);
-
-}
-
-
-#if 0
-/******************************************************************************
-* *
-* Paramètres : operand = opérande à traiter. *
-* format = format du binaire manipulé. *
-* *
-* Description : Traduit un opérande en version humainement lisible. *
-* *
-* Retour : Chaîne de caractères à libérer de la mémoire. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static char *g_jvm_ref_operand_get_text(const GJvmRefOperand *operand, const exe_format *format)
-{
- char *result; /* Chaîne à retourner */
-
- switch (operand->type)
- {
- case JOT_FIELD_REF:
- result = NULL;//build_reference_from_java_pool((const java_format *)format, operand->index, JRT_FIELD);
- break;
- case JOT_METHOD_REF:
- result = NULL;//build_reference_from_java_pool((const java_format *)format, operand->index, JRT_METHOD);
- break;
- default:
- result = NULL;
- break;
- }
-
- if (result == NULL)
- result = strdup("&lt;bad_reference&gt;");
-
- return result;
-
-}
-#endif
-
-
-
-
-
-
-
-/* ---------------------------------------------------------------------------------- */
-/* AIDE A LA CREATION D'OPERANDES */
-/* ---------------------------------------------------------------------------------- */
-
-
-/******************************************************************************
-* *
-* Paramètres : instr = instruction dont la définition est à compléter. [OUT]*
-* data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* type = type de l'opérande. *
-* ... = éventuelle(s) information(s) complémentaire(s). *
-* *
-* Description : Procède à la lecture d'un opérande donné. *
-* *
-* Retour : Bilan de l'opération : true en cas de succès, false sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool jvm_read_one_operand(GArchInstruction *instr, const bin_t *data, off_t *pos, off_t len, JvmOperandType type, ...)
-{
- va_list ap; /* Liste des compléments */
- GArchOperand *op; /* Opérande unique décodé */
-
- va_start(ap, type);
-
- switch (type)
- {
- case JOT_FIELD_REF:
- case JOT_METHOD_REF:
- op = g_jvm_ref_operand_new(data, pos, len, type);
- break;
-
- default:
- op = NULL;
- break;
- }
-
- va_end(ap);
-
- if (op == NULL) return false;
-
- g_arch_instruction_attach_extra_operand(instr, op);
-
- return true;
-
-}
diff --git a/src/arch/jvm/operand.h b/src/arch/jvm/operand.h
deleted file mode 100644
index 8f4288d..0000000
--- a/src/arch/jvm/operand.h
+++ /dev/null
@@ -1,109 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * operand.h - prototypes pour la gestion des operandes de l'architecture JVM
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _ARCH_JVM_OPERAND_H
-#define _ARCH_JVM_OPERAND_H
-
-
-#include "../instruction.h"
-
-
-
-/* Types d'opérandes supportés */
-typedef enum _JvmOperandType JvmOperandType;
-
-
-
-/* ---------------------- COQUILLE VIDE POUR LES OPERANDES JVM ---------------------- */
-
-
-#define G_TYPE_JVM_OPERAND g_jvm_operand_get_type()
-#define G_JVM_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_JVM_OPERAND, GJvmOperand))
-#define G_IS_JVM_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_JVM_OPERAND))
-#define G_JVM_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_JVM_OPERAND, GJvmOperandClass))
-#define G_IS_JVM_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_JVM_OPERAND))
-#define G_JVM_OPERAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_JVM_OPERAND, GJvmOperandClass))
-
-
-/* Définition d'un opérande de la JVM (instance) */
-typedef struct _GJvmOperand GJvmOperand;
-
-/* Définition d'un opérande de la JVM (classe) */
-typedef struct _GJvmOperandClass GJvmOperandClass;
-
-
-/* Indique le type défini par la GLib pour un opérande de JVM. */
-GType g_jvm_operand_get_type(void);
-
-
-
-
-
-
-
-/* --------------------- OPERANDES RENVOYANT VERS UNE REFERENCE --------------------- */
-
-
-#define G_TYPE_JVM_REF_OPERAND g_jvm_ref_operand_get_type()
-#define G_JVM_REF_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_jvm_ref_operand_get_type(), GJvmRefOperand))
-#define G_IS_JVM_REF_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_jvm_ref_operand_get_type()))
-#define G_JVM_REF_OPERAND_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_jvm_ref_operand_get_type(), GJvmRefOperandIface))
-
-
-/* Définition d'un opérande de référence de la JVM (instance) */
-typedef struct _GJvmRefOperand GJvmRefOperand;
-
-/* Définition d'un opérande de référence de la JVM (classe) */
-typedef struct _GJvmRefOperandClass GJvmRefOperandClass;
-
-
-/* Indique le type défini par la GLib pour un opérande de référence de JVM. */
-GType g_jvm_ref_operand_get_type(void);
-
-/* Crée un opérande de référence pour la JVM. */
-GArchOperand *g_jvm_ref_operand_new(const bin_t *, off_t *, off_t, JvmOperandType);
-
-
-
-
-
-/* ------------------------- AIDE A LA CREATION D'OPERANDES ------------------------- */
-
-
-/* Types d'opérandes supportés */
-enum _JvmOperandType
-{
- JOT_FIELD_REF, /* Référence vers un champ */
- JOT_METHOD_REF, /* Référence vers une méthode */
-
- JOT_COUNT
-
-};
-
-
-/* Procède à la lecture d'un opérande donné. */
-bool jvm_read_one_operand(GArchInstruction *, const bin_t *, off_t *, off_t, JvmOperandType, ...);
-
-
-
-#endif /* _ARCH_JVM_OPERAND_H */
diff --git a/src/arch/jvm/processor.c b/src/arch/jvm/processor.c
deleted file mode 100644
index f25dabc..0000000
--- a/src/arch/jvm/processor.c
+++ /dev/null
@@ -1,400 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * processor.c - manipulation du processeur de la JVM
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "processor.h"
-
-
-#include "instruction.h"
-#include "opcodes.h"
-#include "../processor-int.h"
-
-
-
-/* Définition du processeur de la JVM (instance) */
-struct _GJvmProcessor
-{
- GArchProcessor parent; /* Instance parente */
-
-};
-
-
-/* Définition du processeur de la JVM (classe) */
-struct _GJvmProcessorClass
-{
- GArchProcessorClass parent; /* Classe parente */
-
-};
-
-
-/* Initialise la classe des processeurs de JVM. */
-static void g_jvm_processor_class_init(GJvmProcessorClass *);
-
-/* Initialise une instance de processeur de JVM. */
-static void g_jvm_processor_init(GJvmProcessor *);
-
-/* Supprime toutes les références externes. */
-static void g_jvm_processor_dispose(GJvmProcessor *);
-
-/* Procède à la libération totale de la mémoire. */
-static void g_jvm_processor_finalize(GJvmProcessor *);
-
-/* Décode une instruction dans un flux de données. */
-static GArchInstruction *g_jvm_processor_decode_instruction(const GJvmProcessor *, const bin_t *, off_t *, off_t, vmpa_t);
-
-
-/* Indique le type défini par la GLib pour le processeur JVM. */
-G_DEFINE_TYPE(GJvmProcessor, g_jvm_processor, G_TYPE_ARCH_PROCESSOR);
-
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe à initialiser. *
-* *
-* Description : Initialise la classe des processeurs de JVM. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_processor_class_init(GJvmProcessorClass *klass)
-{
- GObjectClass *object; /* Autre version de la classe */
- GArchProcessorClass *proc; /* Encore une autre vision... */
-
- object = G_OBJECT_CLASS(klass);
-
- object->dispose = (GObjectFinalizeFunc/* ! */)g_jvm_processor_dispose;
- object->finalize = (GObjectFinalizeFunc)g_jvm_processor_finalize;
-
- proc = G_ARCH_PROCESSOR_CLASS(klass);
-
- proc->decode = (decode_instruction_fc)g_jvm_processor_decode_instruction;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : proc = instance à initialiser. *
-* *
-* Description : Initialise une instance de processeur de JVM. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_processor_init(GJvmProcessor *proc)
-{
- GArchProcessor *parent; /* Instance parente */
-
- parent = G_ARCH_PROCESSOR(proc);
-
- parent->endianness = SRE_BIG;
- parent->memsize = MDS_32_BITS;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : proc = instance d'objet GLib à traiter. *
-* *
-* Description : Supprime toutes les références externes. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_processor_dispose(GJvmProcessor *proc)
-{
- G_OBJECT_CLASS(g_jvm_processor_parent_class)->dispose(G_OBJECT(proc));
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : bookmark = instance d'objet GLib à traiter. *
-* *
-* Description : Procède à la libération totale de la mémoire. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_jvm_processor_finalize(GJvmProcessor *proc)
-{
- G_OBJECT_CLASS(g_jvm_processor_parent_class)->finalize(G_OBJECT(proc));
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : - *
-* *
-* Description : Crée le support de l'architecture JVM. *
-* *
-* Retour : Architecture mise en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchProcessor *g_jvm_processor_new(void)
-{
- GArchProcessor *result; /* Structure à retourner */
-
- result = g_object_new(G_TYPE_JVM_PROCESSOR, NULL);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : proc = architecture visée par la procédure. *
-* data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
-* *
-* Description : Décode une instruction dans un flux de données. *
-* *
-* Retour : Instruction mise en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static GArchInstruction *g_jvm_processor_decode_instruction(const GJvmProcessor *proc, const bin_t *data, off_t *pos, off_t len, vmpa_t addr)
-{
- GArchInstruction *result; /* Instruction à renvoyer */
- bool wide; /* Utilisation d'étendues */
- bool care; /* Traitement des opcodes */
- JvmOpcodes id; /* Identifiant d'instruction */
-
- id = jvm_guess_next_instruction(data, *pos, len, &wide, &care);
-
- if (id != JOP_COUNT && !care)
- {
- if (wide) (*pos)++;
- (*pos)++;
- }
-
- switch (id)
- {
- case JOP_NOP:
- result = jvm_read_instr_nop(data, pos, len, addr, proc);
- break;
-
- case JOP_ACONST_NULL:
- result = jvm_read_instr_aconst_null(data, pos, len, addr, proc);
- break;
-
- case JOP_ICONST_M1:
- case JOP_ICONST_0:
- case JOP_ICONST_1:
- case JOP_ICONST_2:
- case JOP_ICONST_3:
- case JOP_ICONST_4:
- case JOP_ICONST_5:
- result = jvm_read_instr_iconst_n(data, pos, len, addr, proc);
- break;
-
- case JOP_POP:
- result = jvm_read_instr_pop(data, pos, len, addr, proc);
- break;
-
- case JOP_POP2:
- result = jvm_read_instr_pop2(data, pos, len, addr, proc);
- break;
-
- case JOP_DUP:
- result = jvm_read_instr_dup(data, pos, len, addr, proc);
- break;
-
- case JOP_DUP_X1:
- result = jvm_read_instr_dup_x1(data, pos, len, addr, proc);
- break;
-
- case JOP_DUP_X2:
- result = jvm_read_instr_dup_x2(data, pos, len, addr, proc);
- break;
-
- case JOP_DUP2:
- result = jvm_read_instr_dup2(data, pos, len, addr, proc);
- break;
-
- case JOP_DUP2_X1:
- result = jvm_read_instr_dup2_x1(data, pos, len, addr, proc);
- break;
-
- case JOP_DUP2_X2:
- result = jvm_read_instr_dup2_x2(data, pos, len, addr, proc);
- break;
-
- case JOP_IADD:
- result = jvm_read_instr_iadd(data, pos, len, addr, proc);
- break;
-
- case JOP_I2L:
- result = jvm_read_instr_i2l(data, pos, len, addr, proc);
- break;
-
- case JOP_I2F:
- result = jvm_read_instr_i2f(data, pos, len, addr, proc);
- break;
-
- case JOP_I2D:
- result = jvm_read_instr_i2d(data, pos, len, addr, proc);
- break;
-
- case JOP_L2I:
- result = jvm_read_instr_l2i(data, pos, len, addr, proc);
- break;
-
- case JOP_L2F:
- result = jvm_read_instr_l2f(data, pos, len, addr, proc);
- break;
-
- case JOP_L2D:
- result = jvm_read_instr_l2d(data, pos, len, addr, proc);
- break;
-
- case JOP_F2I:
- result = jvm_read_instr_f2i(data, pos, len, addr, proc);
- break;
-
- case JOP_F2L:
- result = jvm_read_instr_f2l(data, pos, len, addr, proc);
- break;
-
- case JOP_F2D:
- result = jvm_read_instr_f2d(data, pos, len, addr, proc);
- break;
-
- case JOP_D2I:
- result = jvm_read_instr_d2i(data, pos, len, addr, proc);
- break;
-
- case JOP_D2L:
- result = jvm_read_instr_d2l(data, pos, len, addr, proc);
- break;
-
- case JOP_D2F:
- result = jvm_read_instr_d2f(data, pos, len, addr, proc);
- break;
-
- case JOP_I2B:
- result = jvm_read_instr_i2b(data, pos, len, addr, proc);
- break;
-
- case JOP_I2C:
- result = jvm_read_instr_i2c(data, pos, len, addr, proc);
- break;
-
- case JOP_I2S:
- result = jvm_read_instr_i2s(data, pos, len, addr, proc);
- break;
-
- case JOP_ILOAD_0:
- case JOP_ILOAD_1:
- case JOP_ILOAD_2:
- case JOP_ILOAD_3:
- result = jvm_read_instr_iload_n(data, pos, len, addr, proc);
- break;
-
- case JOP_ALOAD_0:
- case JOP_ALOAD_1:
- case JOP_ALOAD_2:
- case JOP_ALOAD_3:
- result = jvm_read_instr_aload_n(data, pos, len, addr, proc);
- break;
-
- case JOP_ISTORE_0:
- case JOP_ISTORE_1:
- case JOP_ISTORE_2:
- case JOP_ISTORE_3:
- result = jvm_read_instr_istore_n(data, pos, len, addr, proc);
- break;
-
- case JOP_IRETURN:
- result = jvm_read_instr_ireturn(data, pos, len, addr, proc);
- break;
-
- case JOP_LRETURN:
- result = jvm_read_instr_lreturn(data, pos, len, addr, proc);
- break;
-
- case JOP_FRETURN:
- result = jvm_read_instr_freturn(data, pos, len, addr, proc);
- break;
-
- case JOP_DRETURN:
- result = jvm_read_instr_dreturn(data, pos, len, addr, proc);
- break;
-
- case JOP_ARETURN:
- result = jvm_read_instr_areturn(data, pos, len, addr, proc);
- break;
-
- case JOP_RETURN:
- result = jvm_read_instr_return(data, pos, len, addr, proc);
- break;
-
- case JOP_GETSTATIC:
- result = jvm_read_instr_getstatic(data, pos, len, addr, proc);
- break;
-
- case JOP_INVOKE_VIRTUAL:
- result = jvm_read_instr_invokevirtual(data, pos, len, addr, proc);
- break;
-
- case JOP_INVOKE_SPECIAL:
- result = jvm_read_instr_invokespecial(data, pos, len, addr, proc);
- break;
-
- case JOP_INVOKE_STATIC:
- result = jvm_read_instr_invokestatic(data, pos, len, addr, proc);
- break;
-
- default:
- result = NULL;
- break;
-
- }
-
- return result;
-
-}
diff --git a/src/arch/jvm/processor.h b/src/arch/jvm/processor.h
deleted file mode 100644
index 7123d0c..0000000
--- a/src/arch/jvm/processor.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * processor.h - prototypes pour la manipulation du processeur de la JVM
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _ARCH_JVM_PROCESSOR_H
-#define _ARCH_JVM_PROCESSOR_H
-
-
-#include "../processor.h"
-
-
-
-#define G_TYPE_JVM_PROCESSOR g_jvm_processor_get_type()
-#define G_JVM_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_JVM_PROCESSOR, GJvmProcessor))
-#define G_IS_JVM_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_JVM_PROCESSOR))
-#define G_JVM_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_JVM_PROCESSOR, GJvmProcessorClass))
-#define G_IS_JVM_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_JVM_PROCESSOR))
-#define G_JVM_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_JVM_PROCESSOR, GJvmProcessorClass))
-
-
-/* Définition du processeur de la JVM (instance) */
-typedef struct _GJvmProcessor GJvmProcessor;
-
-/* Définition du processeur de la JVM (classe) */
-typedef struct _GJvmProcessorClass GJvmProcessorClass;
-
-
-/* Indique le type défini par la GLib pour le processeur JVM. */
-GType g_jvm_processor_get_type(void);
-
-/* Crée le support de l'architecture JVM. */
-GArchProcessor *g_jvm_processor_new(void);
-
-
-
-#endif /* _ARCH_JVM_PROCESSOR_H */