summaryrefslogtreecommitdiff
path: root/src/arch/artificial.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/artificial.c')
-rw-r--r--src/arch/artificial.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/arch/artificial.c b/src/arch/artificial.c
index 4131e5f..9b84226 100644
--- a/src/arch/artificial.c
+++ b/src/arch/artificial.c
@@ -24,6 +24,9 @@
#include "artificial.h"
+#include <string.h>
+
+
#include "immediate.h"
#include "instruction-int.h"
@@ -63,8 +66,8 @@ static void g_db_instruction_dispose(GDbInstruction *);
/* Procède à la libération totale de la mémoire. */
static void g_db_instruction_finalize(GDbInstruction *);
-/* Fournit le nom humain de l'instruction manipulée. */
-static const char *g_db_instruction_get_keyword(const GDbInstruction *, AsmSyntax);
+/* Reconstruit le cache complet d'une désignation d'instruction. */
+static void g_db_instruction_build_keyword(const GDbInstruction *, AsmSyntax);
/* Informe sur une éventuelle référence à une autre instruction. */
static InstructionLinkType g_db_instruction_get_link(const GDbInstruction *, vmpa_t *);
@@ -107,7 +110,7 @@ static void g_db_instruction_class_init(GDbInstructionClass *klass)
instr = G_ARCH_INSTRUCTION_CLASS(klass);
- instr->get_key = (get_instruction_keyword_fc)g_db_instruction_get_keyword;
+ instr->build_key = (build_instruction_keyword_fc)g_db_instruction_build_keyword;
}
@@ -233,7 +236,7 @@ GArchInstruction *g_db_instruction_new_from_data(const bin_t *data, vmpa2t *addr
* format = format du binaire manipulé. *
* syntax = type de représentation demandée. *
* *
-* Description : Fournit le nom humain de l'instruction manipulée. *
+* Description : Reconstruit le cache complet d'une désignation d'instruction.*
* *
* Retour : Mot clef de bas niveau. *
* *
@@ -241,9 +244,9 @@ GArchInstruction *g_db_instruction_new_from_data(const bin_t *data, vmpa2t *addr
* *
******************************************************************************/
-static const char *g_db_instruction_get_keyword(const GDbInstruction *instr, AsmSyntax syntax)
+static void g_db_instruction_build_keyword(const GDbInstruction *instr, AsmSyntax syntax)
{
- return "db";
+ G_ARCH_INSTRUCTION(instr)->cached_keyword = strdup("db");
}