summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 7e1e646..0041129 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -1059,6 +1059,35 @@ const char *g_arch_instruction_get_keyword(GArchInstruction *instr, AsmSyntax sy
}
+/******************************************************************************
+* *
+* Paramètres : instr = instruction d'assemblage à consulter. *
+* *
+* Description : Construit un petit résumé concis de l'instruction. *
+* *
+* Retour : Chaîne de caractères à libérer après usage ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+char *g_arch_instruction_build_tooltip(const GArchInstruction *instr)
+{
+ char *result; /* Description à retourner */
+ GArchInstructionClass *class; /* Classe des instructions */
+
+ class = G_ARCH_INSTRUCTION_GET_CLASS(instr);
+
+ if (class->build_tooltip != NULL)
+ result = class->build_tooltip(instr);
+
+ else
+ result = NULL;
+
+ return result;
+
+}
+
/* ---------------------------------------------------------------------------------- */
/* OFFRE DE CAPACITES DE GENERATION */
@@ -1188,7 +1217,7 @@ static void _g_arch_instruction_print(GArchInstruction *instr, GBufferLine *line
key = g_arch_instruction_get_keyword(instr, 0/*, syntax*/);
klen = strlen(key);
- g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, NULL);
+ g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, G_OBJECT(instr));
/* Liste des opérandes */