summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/db/items/switcher.h2
-rw-r--r--src/analysis/disass/links.c3
-rw-r--r--src/arch/Makefile.am3
-rw-r--r--src/arch/instruction.h2
-rw-r--r--src/arch/link.c3
-rw-r--r--src/arch/operands/Makefile.am5
-rw-r--r--src/arch/operands/immediate.c (renamed from src/arch/immediate.c)40
-rw-r--r--src/arch/operands/immediate.h (renamed from src/arch/immediate.h)20
-rw-r--r--src/arch/operands/targetable-int.h (renamed from src/arch/targetableop-int.h)10
-rw-r--r--src/arch/operands/targetable.c (renamed from src/arch/targetableop.c)6
-rw-r--r--src/arch/operands/targetable.h (renamed from src/arch/targetableop.h)14
-rw-r--r--src/arch/post.c1
-rw-r--r--src/arch/raw.c2
-rw-r--r--src/arch/target.c3
-rw-r--r--src/core/processors.c2
-rw-r--r--src/gui/menus/edition.c2
16 files changed, 61 insertions, 57 deletions
diff --git a/src/analysis/db/items/switcher.h b/src/analysis/db/items/switcher.h
index 4947383..c362b1b 100644
--- a/src/analysis/db/items/switcher.h
+++ b/src/analysis/db/items/switcher.h
@@ -28,8 +28,8 @@
#include <glib-object.h>
-#include "../../../arch/immediate.h"
#include "../../../arch/instruction.h"
+#include "../../../arch/operands/immediate.h"
diff --git a/src/analysis/disass/links.c b/src/analysis/disass/links.c
index 4eba0d7..5fc8321 100644
--- a/src/analysis/disass/links.c
+++ b/src/analysis/disass/links.c
@@ -30,7 +30,8 @@
#include "../../arch/instruction.h"
#include "../../arch/raw.h"
#include "../../arch/target.h"
-#include "../../arch/targetableop.h"
+#include "../../arch/operands/immediate.h"
+#include "../../arch/operands/targetable.h"
diff --git a/src/arch/Makefile.am b/src/arch/Makefile.am
index c83dd0c..e22c1d8 100644
--- a/src/arch/Makefile.am
+++ b/src/arch/Makefile.am
@@ -7,7 +7,6 @@ libarch_la_SOURCES = \
context.h context.c \
feeder-int.h \
feeder.h feeder.c \
- immediate.h immediate.c \
instriter.h instriter.c \
instruction-int.h \
instruction.h instruction.c \
@@ -24,8 +23,6 @@ libarch_la_SOURCES = \
register.h register.c \
storage.h storage.c \
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/instruction.h b/src/arch/instruction.h
index d1bfbe2..af6b03a 100644
--- a/src/arch/instruction.h
+++ b/src/arch/instruction.h
@@ -29,7 +29,7 @@
#include "context.h"
-#include "immediate.h"
+#include "operand.h"
#include "register.h"
#include "vmpa.h"
#include "../analysis/type.h"
diff --git a/src/arch/link.c b/src/arch/link.c
index 7eaa1d9..cba722b 100644
--- a/src/arch/link.c
+++ b/src/arch/link.c
@@ -27,7 +27,8 @@
#include <assert.h>
-#include "targetableop.h"
+#include "operands/immediate.h"
+#include "operands/targetable.h"
diff --git a/src/arch/operands/Makefile.am b/src/arch/operands/Makefile.am
index fb43a22..3d464e3 100644
--- a/src/arch/operands/Makefile.am
+++ b/src/arch/operands/Makefile.am
@@ -2,8 +2,11 @@
noinst_LTLIBRARIES = libarchoperands.la
libarchoperands_la_SOURCES = \
+ immediate.h immediate.c \
register-int.h \
- register.h register.c
+ register.h register.c \
+ targetable-int.h \
+ targetable.h targetable.c
libarchoperands_la_LIBADD =
diff --git a/src/arch/immediate.c b/src/arch/operands/immediate.c
index 2d021be..0ecb5f7 100644
--- a/src/arch/immediate.c
+++ b/src/arch/operands/immediate.c
@@ -37,11 +37,11 @@
#include <i18n.h>
-#include "operand-int.h"
-#include "targetableop-int.h"
-#include "../common/asm.h"
-#include "../common/extstr.h"
-#include "../format/format.h"
+#include "targetable-int.h"
+#include "../operand-int.h"
+#include "../../common/asm.h"
+#include "../../common/extstr.h"
+#include "../../format/format.h"
@@ -641,43 +641,43 @@ void g_imm_operand_set_value(GImmOperand *operand, MemoryDataSize size, uint64_t
/******************************************************************************
* *
-* Paramètres : operand = structure dont le contenu est à actualiser. [OUT] *
-* state = true si des zéro sont à ajouter, false sinon. *
+* Paramètres : operand = structure dont le contenu est à consulter. *
* *
-* Description : Précise si des zéro doivent compléter l'affichage ou non. *
+* Description : Indique si une valeur est complétée par des zéros par défaut.*
* *
-* Retour : - *
+* Retour : true si des zéro sont ajoutés à l'affichage, false sinon. *
* *
* Remarques : - *
* *
******************************************************************************/
-void g_imm_operand_pad_by_default(GImmOperand *operand, bool state)
+bool g_imm_operand_get_default_padding(const GImmOperand *operand)
{
- IMM_SET_DEF_ZERO_PADDING(operand, state);
+ bool result; /* Statut à retourner */
+
+ result = IMM_GET_DEF_ZERO_PADDING(operand);
+
+ return result;
}
/******************************************************************************
* *
-* Paramètres : operand = structure dont le contenu est à consulter. *
+* Paramètres : operand = structure dont le contenu est à actualiser. [OUT] *
+* state = true si des zéro sont à ajouter, false sinon. *
* *
-* Description : Indique si une valeur est complétée par des zéros par défaut.*
+* Description : Précise si des zéro doivent compléter l'affichage ou non. *
* *
-* Retour : true si des zéro sont ajoutés à l'affichage, false sinon. *
+* Retour : - *
* *
* Remarques : - *
* *
******************************************************************************/
-bool g_imm_operand_does_padding_by_default(const GImmOperand *operand)
+void g_imm_operand_set_default_padding(GImmOperand *operand, bool state)
{
- bool result; /* Statut à retourner */
-
- result = IMM_GET_DEF_ZERO_PADDING(operand);
-
- return result;
+ IMM_SET_DEF_ZERO_PADDING(operand, state);
}
diff --git a/src/arch/immediate.h b/src/arch/operands/immediate.h
index 149eff8..4d9a77e 100644
--- a/src/arch/immediate.h
+++ b/src/arch/operands/immediate.h
@@ -21,8 +21,8 @@
*/
-#ifndef _ARCH_IMMEDIATE_H
-#define _ARCH_IMMEDIATE_H
+#ifndef _ARCH_OPERANDS_IMMEDIATE_H
+#define _ARCH_OPERANDS_IMMEDIATE_H
#include <glib-object.h>
@@ -30,9 +30,9 @@
#include <stdint.h>
-#include "archbase.h"
-#include "operand.h"
-#include "../analysis/content.h"
+#include "../archbase.h"
+#include "../operand.h"
+#include "../../analysis/content.h"
@@ -92,11 +92,11 @@ uint64_t g_imm_operand_get_raw_value(const GImmOperand *);
/* Définit la nouvelle valeur de l'opérande à une valeur. */
void g_imm_operand_set_value(GImmOperand *, MemoryDataSize, uint64_t);
-/* Précise si des zéro doivent compléter l'affichage ou non. */
-void g_imm_operand_pad_by_default(GImmOperand *, bool);
-
/* Indique si une valeur est complétée par des zéros par défaut. */
-bool g_imm_operand_does_padding_by_default(const GImmOperand *);
+bool g_imm_operand_get_default_padding(const GImmOperand *);
+
+/* Précise si des zéro doivent compléter l'affichage ou non. */
+void g_imm_operand_set_default_padding(GImmOperand *, bool);
/* Précise si des zéro doivent compléter l'affichage ou non. */
void g_imm_operand_pad(GImmOperand *, bool);
@@ -154,4 +154,4 @@ bool g_imm_operand_to_off_t(const GImmOperand *, off_t *, bool *) __attribute__
-#endif /* _ARCH_IMMEDIATE_H */
+#endif /* _ARCH_OPERANDS_IMMEDIATE_H */
diff --git a/src/arch/targetableop-int.h b/src/arch/operands/targetable-int.h
index 9afce11..2aec35d 100644
--- a/src/arch/targetableop-int.h
+++ b/src/arch/operands/targetable-int.h
@@ -1,6 +1,6 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * targetableop-int.h - définitions internes propres aux opérandes ciblant une portion de désassemblage
+ * targetable-int.h - définitions internes propres aux opérandes ciblant une portion de désassemblage
*
* Copyright (C) 2018 Cyrille Bagard
*
@@ -21,11 +21,11 @@
*/
-#ifndef _GLIBEXT_TARGETABLEOP_INT_H
-#define _GLIBEXT_TARGETABLEOP_INT_H
+#ifndef _ARCH_OPERANDS_TARGETABLE_INT_H
+#define _ARCH_OPERANDS_TARGETABLE_INT_H
-#include "targetableop.h"
+#include "targetable.h"
@@ -48,4 +48,4 @@ typedef GTargetableOperandIface GTargetableOperandInterface;
-#endif /* _GLIBEXT_TARGETABLEOP_INT_H */
+#endif /* _ARCH_OPERANDS_TARGETABLE_INT_H */
diff --git a/src/arch/targetableop.c b/src/arch/operands/targetable.c
index eab26a8..2491e11 100644
--- a/src/arch/targetableop.c
+++ b/src/arch/operands/targetable.c
@@ -1,6 +1,6 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * targetableop.c - opérandes ciblant une portion de désassemblage
+ * targetable.c - opérandes ciblant une portion de désassemblage
*
* Copyright (C) 2018 Cyrille Bagard
*
@@ -21,10 +21,10 @@
*/
-#include "targetableop.h"
+#include "targetable.h"
-#include "targetableop-int.h"
+#include "targetable-int.h"
diff --git a/src/arch/targetableop.h b/src/arch/operands/targetable.h
index f6cc7bf..a0f30a4 100644
--- a/src/arch/targetableop.h
+++ b/src/arch/operands/targetable.h
@@ -1,6 +1,6 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * targetableop.h - prototypes pour les opérandes ciblant une portion de désassemblage
+ * targetable.h - prototypes pour les opérandes ciblant une portion de désassemblage
*
* Copyright (C) 2018 Cyrille Bagard
*
@@ -21,17 +21,17 @@
*/
-#ifndef _GLIBEXT_TARGETABLEOP_H
-#define _GLIBEXT_TARGETABLEOP_H
+#ifndef _ARCH_OPERANDS_TARGETABLE_H
+#define _ARCH_OPERANDS_TARGETABLE_H
#include <glib-object.h>
#include <stdbool.h>
-#include "vmpa.h"
-#include "../arch/processor.h"
-#include "../format/format.h"
+#include "../vmpa.h"
+#include "../processor.h"
+#include "../../format/format.h"
@@ -58,4 +58,4 @@ bool g_targetable_operand_get_addr(const GTargetableOperand *, const vmpa2t *, G
-#endif /* _GLIBEXT_TARGETABLEOP_H */
+#endif /* _ARCH_OPERANDS_TARGETABLE_H */
diff --git a/src/arch/post.c b/src/arch/post.c
index de07499..d6ada4c 100644
--- a/src/arch/post.c
+++ b/src/arch/post.c
@@ -29,6 +29,7 @@
#include "processor.h"
#include "target.h"
+#include "operands/immediate.h"
#include "../analysis/routine.h"
diff --git a/src/arch/raw.c b/src/arch/raw.c
index 17f1ea6..9d597fa 100644
--- a/src/arch/raw.c
+++ b/src/arch/raw.c
@@ -32,9 +32,9 @@
#include <i18n.h>
-#include "immediate.h"
#include "instruction-int.h"
#include "target.h"
+#include "operands/immediate.h"
diff --git a/src/arch/target.c b/src/arch/target.c
index a8acd67..1a708d0 100644
--- a/src/arch/target.c
+++ b/src/arch/target.c
@@ -33,7 +33,8 @@
#include "operand-int.h"
-#include "targetableop-int.h"
+#include "operands/immediate.h"
+#include "operands/targetable-int.h"
#include "../analysis/routine.h"
#include "../common/extstr.h"
#include "../format/format.h"
diff --git a/src/core/processors.c b/src/core/processors.c
index 42d4e4b..1255129 100644
--- a/src/core/processors.c
+++ b/src/core/processors.c
@@ -29,10 +29,10 @@
#include <string.h>
-#include "../arch/immediate.h"
#include "../arch/raw.h"
#include "../arch/target.h"
#include "../arch/undefined.h"
+#include "../arch/operands/immediate.h"
#include "../arch/operands/register.h"
diff --git a/src/gui/menus/edition.c b/src/gui/menus/edition.c
index e1ef696..f3f1fb2 100644
--- a/src/gui/menus/edition.c
+++ b/src/gui/menus/edition.c
@@ -38,7 +38,7 @@
#include "../dialogs/gotox.h"
#include "../../analysis/binary.h"
#include "../../analysis/db/items/switcher.h"
-#include "../../arch/targetableop.h"
+#include "../../arch/operands/targetable.h"
#include "../../glibext/gbinarycursor.h"
#include "../../gtkext/easygtk.h"
#include "../../gtkext/gtkblockdisplay.h"