summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2011-12-23 15:49:56 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2011-12-23 15:49:56 (GMT)
commit55c034aa3d975320dbaa7e643e68289732386eec (patch)
tree2011c2a619197eb8e17b5cbb2a3fe4dd35986e6b /src/arch/instruction.c
parenta6f7f152b62dd79ec492c0b3f51a2b5d19732d27 (diff)
Decoded Dalvik pseudo-instructions properly.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@216 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 677a1a3..047ed86 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -46,6 +46,14 @@ static void g_arch_instruction_to_buffer(const GArchInstruction *, GBufferLine *
+/* --------------------- CONVERSIONS DU FORMAT DES INSTRUCTIONS --------------------- */
+
+
+/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
+static void _g_arch_instruction_print(const GArchInstruction *, GCodeBuffer *, MemoryDataSize, const bin_t *, AsmSyntax);
+
+
+
/* Indique le type défini pour une instruction d'architecture. */
G_DEFINE_TYPE(GArchInstruction, g_arch_instruction, G_TYPE_CONTENT_EXPORTER);
@@ -590,7 +598,7 @@ size_t g_arch_instruction_get_destinations(const GArchInstruction *instr, GArchI
* *
******************************************************************************/
-void g_arch_instruction_print(const GArchInstruction *instr, GCodeBuffer *buffer, MemoryDataSize msize, const bin_t *content, AsmSyntax syntax)
+static void _g_arch_instruction_print(const GArchInstruction *instr, GCodeBuffer *buffer, MemoryDataSize msize, const bin_t *content, AsmSyntax syntax)
{
GBufferLine *line; /* Ligne de destination */
char address[VMPA_MAX_SIZE]; /* Adresse au format texte */
@@ -653,6 +661,31 @@ void g_arch_instruction_print(const GArchInstruction *instr, GCodeBuffer *buffer
/******************************************************************************
* *
+* Paramètres : instr = instruction d'assemblage à représenter. *
+* buffer = espace où placer ledit contenu. *
+* syntax = type de représentation demandée. *
+* *
+* Description : Ajoute à un tampon GLib le contenu de l'instance spécifiée. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_arch_instruction_print(const GArchInstruction *instr, GCodeBuffer *buffer, MemoryDataSize msize, const bin_t *content, AsmSyntax syntax)
+{
+ if (instr->print != NULL)
+ instr->print(instr, buffer, msize, content, syntax);
+
+ else
+ _g_arch_instruction_print(instr, buffer, msize, content, syntax);
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : instr = instruction d'origine à convertir. *
* ctx = contexte de la phase de décompilation. *
* *