diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/Makefile.am | 1 | ||||
-rw-r--r-- | src/arch/undefined-int.h | 51 | ||||
-rw-r--r-- | src/arch/undefined.c | 19 | ||||
-rw-r--r-- | src/arch/undefined.h | 1 |
4 files changed, 53 insertions, 19 deletions
diff --git a/src/arch/Makefile.am b/src/arch/Makefile.am index ce5db57..c83dd0c 100644 --- a/src/arch/Makefile.am +++ b/src/arch/Makefile.am @@ -26,6 +26,7 @@ libarch_la_SOURCES = \ target.h target.c \ targetableop-int.h \ targetableop.h targetableop.c \ + undefined-int.h \ undefined.h undefined.c \ vmpa.h vmpa.c diff --git a/src/arch/undefined-int.h b/src/arch/undefined-int.h new file mode 100644 index 0000000..2f01c4a --- /dev/null +++ b/src/arch/undefined-int.h @@ -0,0 +1,51 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * undefined-int.h - prototypes pour la définition générique interne des instructions au comportement non défini + * + * Copyright (C) 2018 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * Chrysalide 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. + * + * Chrysalide 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 Chrysalide. If not, see <http://www.gnu.org/licenses/>. + */ + + +#ifndef _ARCH_UNDEFINED_INT_H +#define _ARCH_UNDEFINED_INT_H + + +#include "undefined.h" +#include "instruction-int.h" + + + +/* Définition générique d'une instruction au comportement non défini (instance) */ +struct _GUndefInstruction +{ + GArchInstruction parent; /* A laisser en premier */ + + InstrBehaviorStatus status; /* Conséquences réelles */ + +}; + +/* Définition générique d'une instruction au comportement non défini (classe) */ +struct _GUndefInstructionClass +{ + GArchInstructionClass parent; /* A laisser en premier */ + +}; + + + +#endif /* _ARCH_UNDEFINED_INT_H */ diff --git a/src/arch/undefined.c b/src/arch/undefined.c index 680e4f4..b569eb4 100644 --- a/src/arch/undefined.c +++ b/src/arch/undefined.c @@ -30,27 +30,10 @@ #include <i18n.h> -#include "instruction-int.h" +#include "undefined-int.h" -/* Définition générique d'une instruction au comportement non défini (instance) */ -struct _GUndefInstruction -{ - GArchInstruction parent; /* A laisser en premier */ - - InstrBehaviorStatus status; /* Conséquences réelles */ - -}; - -/* Définition générique d'une instruction au comportement non défini (classe) */ -struct _GUndefInstructionClass -{ - GArchInstructionClass parent; /* A laisser en premier */ - -}; - - /* Initialise la classe des instructions non définies. */ static void g_undef_instruction_class_init(GUndefInstructionClass *); diff --git a/src/arch/undefined.h b/src/arch/undefined.h index 74db9fa..605da0b 100644 --- a/src/arch/undefined.h +++ b/src/arch/undefined.h @@ -55,7 +55,6 @@ typedef enum _InstrBehaviorStatus IBS_UNDEFINED, IBS_UNPREDICTABLE, - } InstrBehaviorStatus; |