diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-04-02 11:58:42 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-04-02 12:39:30 (GMT) |
commit | 1db4ef323b7a76093356ae76268132f3760e1631 (patch) | |
tree | fec36ee0ec1b6b2010b62ca4177edca0e31e2114 /plugins/dalvik/pseudo/fill.c | |
parent | 1bc80837dde03a32b5ab185067f7bd4c499a9850 (diff) |
Rewritten the whole instruction definition format.
Diffstat (limited to 'plugins/dalvik/pseudo/fill.c')
-rw-r--r-- | plugins/dalvik/pseudo/fill.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/plugins/dalvik/pseudo/fill.c b/plugins/dalvik/pseudo/fill.c index dc5683c..5c86a80 100644 --- a/plugins/dalvik/pseudo/fill.c +++ b/plugins/dalvik/pseudo/fill.c @@ -28,6 +28,7 @@ #include <string.h> +#include "identifiers.h" #include "../instruction-int.h" @@ -63,6 +64,9 @@ static void g_dalvik_fill_instr_dispose(GDalvikFillInstr *); /* Procède à la libération totale de la mémoire. */ static void g_dalvik_fill_instr_finalize(GDalvikFillInstr *); +/* Fournit le nom humain de l'instruction manipulée. */ +static const char *g_dalvik_fill_instruction_get_keyword(const GDalvikFillInstr *, AsmSyntax); + /* Indique le type défini pour une pseudo-instruction Dalvik de remplissage. */ @@ -84,12 +88,17 @@ G_DEFINE_TYPE(GDalvikFillInstr, g_dalvik_fill_instr, G_TYPE_DALVIK_INSTRUCTION); static void g_dalvik_fill_instr_class_init(GDalvikFillInstrClass *klass) { GObjectClass *object; /* Autre version de la classe */ + GArchInstructionClass *instr; /* Encore une autre vision... */ object = G_OBJECT_CLASS(klass); object->dispose = (GObjectFinalizeFunc/* ! */)g_dalvik_fill_instr_dispose; object->finalize = (GObjectFinalizeFunc)g_dalvik_fill_instr_finalize; + instr = G_ARCH_INSTRUCTION_CLASS(klass); + + instr->get_keyword = (get_instruction_keyword_fc)g_dalvik_fill_instruction_get_keyword; + } @@ -107,7 +116,6 @@ static void g_dalvik_fill_instr_class_init(GDalvikFillInstrClass *klass) static void g_dalvik_fill_instr_init(GDalvikFillInstr *instr) { - G_DALVIK_INSTRUCTION(instr)->keyword = "array-data"; } @@ -174,7 +182,7 @@ GArchInstruction *g_dalvik_fill_instr_new(uint16_t ident, GDalvikContext *ctx, c result = g_object_new(G_TYPE_DALVIK_FILL_INSTR, NULL); - G_DALVIK_INSTRUCTION(result)->ptype = ident; + G_ARCH_INSTRUCTION(result)->uid = DPO_FILL_ARRAY_DATA; if (!g_binary_content_read_u16(content, pos, SRE_LITTLE, &result->item_width)) goto gdfin_bad; @@ -196,3 +204,27 @@ GArchInstruction *g_dalvik_fill_instr_new(uint16_t ident, GDalvikContext *ctx, c return NULL; } + + +/****************************************************************************** +* * +* Paramètres : instr = instruction d'assemblage à consulter. * +* syntax = type de représentation demandée. * +* * +* Description : Fournit le nom humain de l'instruction manipulée. * +* * +* Retour : Mot clef de bas niveau. * +* * +* Remarques : - * +* * +******************************************************************************/ + +static const char *g_dalvik_fill_instruction_get_keyword(const GDalvikFillInstr *instr, AsmSyntax syntax) +{ + const char *result; /* Désignation à retourner */ + + result = "array-data"; + + return result; + +} |