summaryrefslogtreecommitdiff
path: root/src/arch/operands
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/operands')
-rw-r--r--src/arch/operands/Makefile.am12
-rw-r--r--src/arch/operands/immediate-int.h4
-rw-r--r--src/arch/operands/immediate.c14
-rw-r--r--src/arch/operands/known.c14
-rw-r--r--src/arch/operands/proxy.c12
-rw-r--r--src/arch/operands/target-int.h4
-rw-r--r--src/arch/operands/target.c14
7 files changed, 44 insertions, 30 deletions
diff --git a/src/arch/operands/Makefile.am b/src/arch/operands/Makefile.am
index 4371457..f2a8767 100644
--- a/src/arch/operands/Makefile.am
+++ b/src/arch/operands/Makefile.am
@@ -18,19 +18,9 @@ libarchoperands_la_SOURCES = \
targetable-int.h \
targetable.h targetable.c
-libarchoperands_la_LIBADD =
-
-libarchoperands_la_LDFLAGS =
+libarchoperands_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS)
devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libarchoperands_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-
-SUBDIRS =
diff --git a/src/arch/operands/immediate-int.h b/src/arch/operands/immediate-int.h
index 46bc3ce..d2313f5 100644
--- a/src/arch/operands/immediate-int.h
+++ b/src/arch/operands/immediate-int.h
@@ -70,9 +70,9 @@ struct _GImmOperandClass
* Accès aux informations éventuellement déportées.
*/
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
-# define GET_IMM_OP_EXTRA(op) (immop_extra_data_t *)&op->extra
+# define GET_IMM_OP_EXTRA(op) ((immop_extra_data_t *)&((GArchOperand *)op)->extra)
#else
diff --git a/src/arch/operands/immediate.c b/src/arch/operands/immediate.c
index 0df8bbb..f40c645 100644
--- a/src/arch/operands/immediate.c
+++ b/src/arch/operands/immediate.c
@@ -43,7 +43,7 @@
#include "../../common/asm.h"
#include "../../common/extstr.h"
#include "../../common/sort.h"
-#include "../../gtkext/gtkblockdisplay.h"
+#include "../../core/columns.h"
@@ -82,9 +82,13 @@ static void g_imm_operand_print(const GImmOperand *, GBufferLine *);
/* Compare un opérande avec un autre. */
static int g_imm_operand_compare(const GImmOperand *, const GImmOperand *, bool);
+#ifdef INCLUDE_GTK_SUPPORT
+
/* Construit un petit résumé concis de l'opérande. */
static char *g_imm_operand_build_tooltip(const GImmOperand *, const GLoadedBinary *);
+#endif
+
/* Fournit l'empreinte d'un candidat à une centralisation. */
static guint g_imm_operand_hash(const GImmOperand *, bool);
@@ -148,7 +152,9 @@ static void g_imm_operand_class_init(GImmOperandClass *klass)
operand->compare = (operand_compare_fc)g_imm_operand_compare;
operand->print = (operand_print_fc)g_imm_operand_print;
+#ifdef INCLUDE_GTK_SUPPORT
operand->build_tooltip = (operand_build_tooltip_fc)g_imm_operand_build_tooltip;
+#endif
operand->hash = (operand_hash_fc)g_imm_operand_hash;
@@ -1226,6 +1232,9 @@ static int g_imm_operand_compare(const GImmOperand *a, const GImmOperand *b, boo
}
+#ifdef INCLUDE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : operand = opérande à consulter. *
@@ -1314,6 +1323,9 @@ static char *g_imm_operand_build_tooltip(const GImmOperand *operand, const GLoad
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : operand = objet dont l'instance se veut unique. *
diff --git a/src/arch/operands/known.c b/src/arch/operands/known.c
index a4b3844..5402879 100644
--- a/src/arch/operands/known.c
+++ b/src/arch/operands/known.c
@@ -32,8 +32,8 @@
#include "immediate-int.h"
#include "rename-int.h"
#include "../../analysis/db/misc/rlestr.h"
+#include "../../core/columns.h"
#include "../../core/logs.h"
-#include "../../gtkext/gtkblockdisplay.h"
@@ -292,12 +292,12 @@ GArchOperand *g_known_imm_operand_new(const GImmOperand *old, const char *alt)
static int g_known_imm_operand_compare(const GKnownImmOperand *a, const GKnownImmOperand *b, bool lock)
{
int result; /* Bilan à retourner */
- lockable_obj_extra_t *ea; /* Données insérées à consulter*/
- lockable_obj_extra_t *eb; /* Données insérées à consulter*/
+ immop_extra_data_t *ea; /* Données insérées à consulter*/
+ immop_extra_data_t *eb; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- ea = GET_GOBJECT_EXTRA(G_OBJECT(a), lockable_obj_extra_t);
- eb = GET_GOBJECT_EXTRA(G_OBJECT(b), lockable_obj_extra_t);
+ ea = GET_IMM_OP_EXTRA(G_IMM_OPERAND(a));
+ eb = GET_IMM_OP_EXTRA(G_IMM_OPERAND(b));
if (lock)
{
@@ -364,10 +364,10 @@ static void g_known_imm_operand_print(const GKnownImmOperand *operand, GBufferLi
static guint g_known_imm_operand_hash(const GKnownImmOperand *operand, bool lock)
{
guint result; /* Valeur à retourner */
- lockable_obj_extra_t *extra; /* Données insérées à consulter*/
+ immop_extra_data_t *extra; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- extra = GET_GOBJECT_EXTRA(G_OBJECT(operand), lockable_obj_extra_t);
+ extra = GET_IMM_OP_EXTRA(G_IMM_OPERAND(operand));
if (lock)
LOCK_GOBJECT_EXTRA(extra);
diff --git a/src/arch/operands/proxy.c b/src/arch/operands/proxy.c
index 91690a7..c71f96f 100644
--- a/src/arch/operands/proxy.c
+++ b/src/arch/operands/proxy.c
@@ -241,12 +241,12 @@ GProxyFeeder *g_proxy_operand_get_feeder(const GProxyOperand *operand)
static int g_proxy_operand_compare(const GProxyOperand *a, const GProxyOperand *b, bool lock)
{
int result; /* Bilan à retourner */
- lockable_obj_extra_t *ea; /* Données insérées à consulter*/
- lockable_obj_extra_t *eb; /* Données insérées à consulter*/
+ operand_extra_data_t *ea; /* Données insérées à consulter*/
+ operand_extra_data_t *eb; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- ea = GET_GOBJECT_EXTRA(G_OBJECT(a), lockable_obj_extra_t);
- eb = GET_GOBJECT_EXTRA(G_OBJECT(b), lockable_obj_extra_t);
+ ea = GET_ARCH_OP_EXTRA(G_ARCH_OPERAND(a));
+ eb = GET_ARCH_OP_EXTRA(G_ARCH_OPERAND(b));
if (lock)
{
@@ -309,10 +309,10 @@ static void g_proxy_operand_print(const GProxyOperand *operand, GBufferLine *lin
static guint g_proxy_operand_hash(const GProxyOperand *operand, bool lock)
{
guint result; /* Valeur à retourner */
- lockable_obj_extra_t *extra; /* Données insérées à consulter*/
+ operand_extra_data_t *extra; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- extra = GET_GOBJECT_EXTRA(G_OBJECT(operand), lockable_obj_extra_t);
+ extra = GET_ARCH_OP_EXTRA(G_ARCH_OPERAND(operand));
if (lock)
LOCK_GOBJECT_EXTRA(extra);
diff --git a/src/arch/operands/target-int.h b/src/arch/operands/target-int.h
index ac4cdcd..aa48b2b 100644
--- a/src/arch/operands/target-int.h
+++ b/src/arch/operands/target-int.h
@@ -65,9 +65,9 @@ struct _GTargetOperandClass
* Accès aux informations éventuellement déportées.
*/
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
-# define GET_TARGET_OP_EXTRA(op) (tarop_extra_data_t *)&op->extra
+# define GET_TARGET_OP_EXTRA(op) ((tarop_extra_data_t *)&((GArchOperand *)op)->extra)
#else
diff --git a/src/arch/operands/target.c b/src/arch/operands/target.c
index 068d060..61f683a 100644
--- a/src/arch/operands/target.c
+++ b/src/arch/operands/target.c
@@ -41,7 +41,7 @@
#include "../../format/format.h"
#include "../../format/strsym.h"
#include "../../glibext/gbinarycursor.h"
-#include "../../gtkext/gtkblockdisplay.h"
+#include "../../core/columns.h"
@@ -74,9 +74,13 @@ static int g_target_operand_compare(const GTargetOperand *, const GTargetOperand
/* Traduit un opérande en version humainement lisible. */
static void g_target_operand_print(const GTargetOperand *, GBufferLine *);
+#ifdef INCLUDE_GTK_SUPPORT
+
/* Construit un petit résumé concis de l'opérande. */
static char *g_target_operand_build_tooltip(const GTargetOperand *, const GLoadedBinary *);
+#endif
+
/* Fournit l'empreinte d'un candidat à une centralisation. */
static guint g_target_operand_hash(const GTargetOperand *, bool);
@@ -132,7 +136,9 @@ static void g_target_operand_class_init(GTargetOperandClass *klass)
operand->compare = (operand_compare_fc)g_target_operand_compare;
operand->print = (operand_print_fc)g_target_operand_print;
+#ifdef INCLUDE_GTK_SUPPORT
operand->build_tooltip = (operand_build_tooltip_fc)g_target_operand_build_tooltip;
+#endif
operand->hash = (operand_hash_fc)g_target_operand_hash;
@@ -382,6 +388,9 @@ GArchOperand *g_target_operand_new(MemoryDataSize size, const vmpa2t *addr)
}
+#ifdef INCLUDE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : operand = opérande à consulter. *
@@ -462,6 +471,9 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : operand = structure dont le contenu est à consulter. *