diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-03-24 18:47:25 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-03-24 18:47:33 (GMT) |
commit | a2f149e5d151dcd937351f6e54229e508123c3ad (patch) | |
tree | 49aa468e2e552735ea61ed7e78d29d821e03aafd /src/arch/operand.c | |
parent | 1de9967e2a13baca3df50b02903900e36cee64ae (diff) |
Built tooltips from all kinds of operands.
Diffstat (limited to 'src/arch/operand.c')
-rw-r--r-- | src/arch/operand.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/arch/operand.c b/src/arch/operand.c index 731c757..dd28238 100644 --- a/src/arch/operand.c +++ b/src/arch/operand.c @@ -388,3 +388,33 @@ void g_arch_operand_print(const GArchOperand *operand, GBufferLine *line, AsmSyn G_ARCH_OPERAND_GET_CLASS(operand)->print(operand, line, syntax); } + + +/****************************************************************************** +* * +* Paramètres : operand = opérande à consulter. * +* binary = informations relatives au binaire chargé. * +* * +* Description : Construit un petit résumé concis de l'opérande. * +* * +* Retour : Chaîne de caractères à libérer après usage ou NULL. * +* * +* Remarques : - * +* * +******************************************************************************/ + +char *g_arch_operand_build_tooltip(const GArchOperand *operand, const GLoadedBinary *binary) +{ + char *result; /* Description à retourner */ + GArchOperandClass *class; /* Classe associée à l'objet */ + + class = G_ARCH_OPERAND_GET_CLASS(operand); + + if (class->build_tooltip != NULL) + result = class->build_tooltip(operand, binary); + else + result = NULL; + + return result; + +} |