diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-11-11 01:22:43 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-11-11 01:22:43 (GMT) |
commit | b33a52031c0d44a79604bc8d9036c30bffd020cb (patch) | |
tree | c825e3330684ca57f7c423328cd116b2d6ec0f6a /src/decomp/instruction.c | |
parent | 828124e38d266e382bb1477ef51c9fac8e81c591 (diff) |
Built some expressions for the decompilation tree.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@190 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/decomp/instruction.c')
-rw-r--r-- | src/decomp/instruction.c | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/src/decomp/instruction.c b/src/decomp/instruction.c new file mode 100644 index 0000000..96411f5 --- /dev/null +++ b/src/decomp/instruction.c @@ -0,0 +1,101 @@ + +/* OpenIDA - Outil d'analyse de fichiers binaires + * instruction.c - gestion des instructions décompilées + * + * Copyright (C) 2010 Cyrille Bagard + * + * This file is part of OpenIDA. + * + * OpenIDA is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * OpenIDA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <http://www.gnu.org/licenses/>. + */ + + +#include "instruction.h" + + +#include "instruction-int.h" + + + +/* Initialise la classe des instructions décompilées. */ +static void g_dec_instruction_class_init(GDecInstructionClass *); + +/* Initialise une instance d'instruction décompilée. */ +static void g_dec_instruction_init(GDecInstruction *); + + + +/* Indique le type défini pour une instruction décompilée. */ +G_DEFINE_TYPE(GDecInstruction, g_dec_instruction, G_TYPE_OBJECT); + + +/****************************************************************************** +* * +* Paramètres : klass = classe à initialiser. * +* * +* Description : Initialise la classe des instructions décompilées. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_dec_instruction_class_init(GDecInstructionClass *klass) +{ + +} + + +/****************************************************************************** +* * +* Paramètres : instr = instance à initialiser. * +* * +* Description : Initialise une instance d'instruction décompilée. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_dec_instruction_init(GDecInstruction *instr) +{ + +} + + +/****************************************************************************** +* * +* Paramètres : instr = instruction à transcrire en version humaine. * +* buffer = tampon où doit se réaliser l'insertion. * +* line = ligne d'impression prête à emploi ou NULL. * +* output = langage de programmation de sortie. * +* * +* Description : Imprime pour l'écran un version humaine d'une instruction. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_dec_instruction_print(const GDecInstruction *instr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output) +{ + if (line == NULL) + line = g_code_buffer_append_new_line(buffer); /* FIXME : n° de ligne */ + + instr->print(instr, buffer, line, output); + +} |