summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-06-02 13:06:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-06-02 13:06:58 (GMT)
commit0d10ebabd650128271650ca03d6e0b0ac9facc5c (patch)
tree5ed70dfe9e758a270f1631090fc787f096ee8de4
parent8610b03518c17cbfcbc38198765554b90a2fc6a9 (diff)
Fixed various small bugs in the Dalvik management.
-rw-r--r--plugins/dalvik/instruction.c31
-rw-r--r--plugins/dalvik/v35/instruction.c3
2 files changed, 34 insertions, 0 deletions
diff --git a/plugins/dalvik/instruction.c b/plugins/dalvik/instruction.c
index a95e8d0..e0fecc3 100644
--- a/plugins/dalvik/instruction.c
+++ b/plugins/dalvik/instruction.c
@@ -47,6 +47,9 @@ static void g_dalvik_instruction_dispose(GDalvikInstruction *);
/* Procède à la libération totale de la mémoire. */
static void g_dalvik_instruction_finalize(GDalvikInstruction *);
+/* Indique l'encodage d'une instruction de façon détaillée. */
+static const char *g_dalvik_instruction_get_encoding(const GDalvikInstruction *);
+
/* Construit un petit résumé concis de l'instruction. */
static char *g_dalvik_instruction_build_tooltip(const GDalvikInstruction *);
@@ -80,6 +83,7 @@ static void g_dalvik_instruction_class_init(GDalvikInstructionClass *klass)
instr = G_ARCH_INSTRUCTION_CLASS(klass);
+ instr->get_encoding = (get_instruction_encoding_fc)g_dalvik_instruction_get_encoding;
instr->build_tooltip = (build_instruction_tooltip_fc)g_dalvik_instruction_build_tooltip;
}
@@ -143,6 +147,33 @@ static void g_dalvik_instruction_finalize(GDalvikInstruction *instr)
/******************************************************************************
* *
+* Paramètres : instr = instruction quelconque à consulter. *
+* *
+* Description : Indique l'encodage d'une instruction de façon détaillée. *
+* *
+* Retour : Description humaine de l'encodage utilisé. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static const char *g_dalvik_instruction_get_encoding(const GDalvikInstruction *instr)
+{
+ const char *result; /* Description à retourner */
+
+ /**
+ * Solution de repli pour les pseudo-instructions.
+ */
+
+ result = "Dalvik";
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : instr = instruction Dalvik à consulter. *
* *
* Description : Construit un petit résumé concis de l'instruction. *
diff --git a/plugins/dalvik/v35/instruction.c b/plugins/dalvik/v35/instruction.c
index 1966690..a8a3d95 100644
--- a/plugins/dalvik/v35/instruction.c
+++ b/plugins/dalvik/v35/instruction.c
@@ -239,6 +239,9 @@ static const char *g_dalvik35_instruction_get_keyword(const GDalvik35Instruction
result = _dalvik35_keywords[uid];
+ if (result == NULL)
+ result = "unused";
+
return result;
}