summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/Makefile.am45
-rw-r--r--src/arch/instruction.c14
-rw-r--r--src/arch/instructions/Makefile.am18
-rw-r--r--src/arch/instructions/raw.c2
-rw-r--r--src/arch/instructions/undefined.c2
-rw-r--r--src/arch/operand-int.h6
-rw-r--r--src/arch/operand.c6
-rw-r--r--src/arch/operand.h4
-rw-r--r--src/arch/operands/Makefile.am12
-rw-r--r--src/arch/operands/immediate.c14
-rw-r--r--src/arch/operands/known.c2
-rw-r--r--src/arch/operands/target.c14
12 files changed, 83 insertions, 56 deletions
diff --git a/src/arch/Makefile.am b/src/arch/Makefile.am
index 8a2eea3..bdfceb7 100644
--- a/src/arch/Makefile.am
+++ b/src/arch/Makefile.am
@@ -1,29 +1,29 @@
noinst_LTLIBRARIES = libarch.la
-libarch_la_SOURCES = \
- archbase.h archbase.c \
- context-int.h \
- context.h context.c \
- instriter.h instriter.c \
- instruction-int.h \
- instruction.h instruction.c \
- link.h link.c \
- operand-int.h operand-int.c \
- operand.h operand.c \
- post.h post.c \
- processor-int.h \
- processor.h processor.c \
- register-int.h \
- register.h register.c \
- storage.h storage.c \
+libarch_la_SOURCES = \
+ archbase.h archbase.c \
+ context-int.h \
+ context.h context.c \
+ instriter.h instriter.c \
+ instruction-int.h \
+ instruction.h instruction.c \
+ link.h link.c \
+ operand-int.h operand-int.c \
+ operand.h operand.c \
+ post.h post.c \
+ processor-int.h \
+ processor.h processor.c \
+ register-int.h \
+ register.h register.c \
+ storage.h storage.c \
vmpa.h vmpa.c
-libarch_la_LIBADD = \
- instructions/libarchinstructions.la \
- operands/libarchoperands.la
+libarch_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS)
-libarch_la_LDFLAGS =
+libarch_la_LIBADD = \
+ instructions/libarchinstructions.la \
+ operands/libarchoperands.la
devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
@@ -31,9 +31,4 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libarch_la_SOURCES:%c=)
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-
SUBDIRS = instructions operands
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 4de16d6..7fb9c4a 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -35,11 +35,11 @@
#include "instruction-int.h"
#include "storage.h"
#include "../analysis/storage/serialize-int.h"
+#include "../core/columns.h"
#include "../core/logs.h"
#include "../core/processors.h"
#include "../glibext/gbinarycursor.h"
#include "../glibext/linegen-int.h"
-#include "../gtkext/gtkblockdisplay.h"
@@ -81,12 +81,16 @@ bool g_arch_instruction_store_destinations(GArchInstruction *, GObjectStorage *,
/* Indique le nombre de ligne prêtes à être générées. */
static size_t g_arch_instruction_count_lines(const GArchInstruction *);
+#ifdef HAVE_GTK_SUPPORT
+
/* Retrouve l'emplacement correspondant à une position donnée. */
static void g_arch_instruction_compute_cursor(const GArchInstruction *, gint, size_t, size_t, GLineCursor **);
/* Détermine si le conteneur s'inscrit dans une plage donnée. */
static int g_arch_instruction_contain_cursor(const GArchInstruction *, size_t, size_t, const GLineCursor *);
+#endif
+
/* Renseigne sur les propriétés liées à un générateur. */
static BufferLineFlags g_arch_instruction_get_flags2(const GArchInstruction *, size_t, size_t);
@@ -195,8 +199,10 @@ static void g_arch_instruction_init(GArchInstruction *instr)
static void g_arch_instruction_generator_init(GLineGeneratorInterface *iface)
{
iface->count = (linegen_count_lines_fc)g_arch_instruction_count_lines;
+#ifdef HAVE_GTK_SUPPORT
iface->compute = (linegen_compute_fc)g_arch_instruction_compute_cursor;
iface->contain = (linegen_contain_fc)g_arch_instruction_contain_cursor;
+#endif
iface->get_flags = (linegen_get_flags_fc)g_arch_instruction_get_flags2;
iface->print = (linegen_print_fc)g_arch_instruction_print;
@@ -1835,6 +1841,9 @@ static size_t g_arch_instruction_count_lines(const GArchInstruction *instr)
}
+#ifdef HAVE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : instr = générateur à consulter. *
@@ -1891,6 +1900,9 @@ static int g_arch_instruction_contain_cursor(const GArchInstruction *instr, size
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : instr = générateur à consulter. *
diff --git a/src/arch/instructions/Makefile.am b/src/arch/instructions/Makefile.am
index 24d3eb5..28cf90f 100644
--- a/src/arch/instructions/Makefile.am
+++ b/src/arch/instructions/Makefile.am
@@ -1,24 +1,14 @@
noinst_LTLIBRARIES = libarchinstructions.la
-libarchinstructions_la_SOURCES = \
- raw.h raw.c \
- undefined-int.h \
+libarchinstructions_la_SOURCES = \
+ raw.h raw.c \
+ undefined-int.h \
undefined.h undefined.c
-libarchinstructions_la_LIBADD =
-
-libarchinstructions_la_LDFLAGS =
+libarchinstructions_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS)
devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libarchinstructions_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-
-SUBDIRS =
diff --git a/src/arch/instructions/raw.c b/src/arch/instructions/raw.c
index 6340e46..26282fa 100644
--- a/src/arch/instructions/raw.c
+++ b/src/arch/instructions/raw.c
@@ -35,7 +35,7 @@
#include "../instruction-int.h"
#include "../operands/immediate.h"
#include "../operands/target.h"
-#include "../../gtkext/gtkblockdisplay.h"
+#include "../../core/columns.h"
diff --git a/src/arch/instructions/undefined.c b/src/arch/instructions/undefined.c
index 7ed5db9..15c63e7 100644
--- a/src/arch/instructions/undefined.c
+++ b/src/arch/instructions/undefined.c
@@ -31,7 +31,7 @@
#include "undefined-int.h"
-#include "../../gtkext/gtkblockdisplay.h"
+#include "../../core/columns.h"
diff --git a/src/arch/operand-int.h b/src/arch/operand-int.h
index e78c2b0..3973287 100644
--- a/src/arch/operand-int.h
+++ b/src/arch/operand-int.h
@@ -48,9 +48,13 @@ typedef GArchOperand * (* get_inner_operand_fc) (const GArchOperand *, const cha
/* Traduit un opérande en version humainement lisible. */
typedef void (* operand_print_fc) (const GArchOperand *, GBufferLine *);
+#ifdef HAVE_GTK_SUPPORT
+
/* Construit un petit résumé concis de l'opérande. */
typedef char * (* operand_build_tooltip_fc) (const GArchOperand *, const GLoadedBinary *);
+#endif
+
/* Fournit une liste de candidats embarqués par un candidat. */
typedef GArchOperand ** (* operand_list_inners_fc) (const GArchOperand *, size_t *);
@@ -113,7 +117,9 @@ struct _GArchOperandClass
get_inner_operand_fc get_inner; /* Récupération d'un opérande */
operand_print_fc print; /* Texte humain équivalent */
+#ifdef HAVE_GTK_SUPPORT
operand_build_tooltip_fc build_tooltip; /* Construction de description */
+#endif
operand_list_inners_fc list_inner; /* Récupération d'internes */
operand_update_inners_fc update_inner; /* Mise à jour des éléments */
diff --git a/src/arch/operand.c b/src/arch/operand.c
index f262373..ab7eeab 100644
--- a/src/arch/operand.c
+++ b/src/arch/operand.c
@@ -408,6 +408,9 @@ void g_arch_operand_print(const GArchOperand *operand, GBufferLine *line)
}
+#ifdef HAVE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : operand = opérande à consulter. *
@@ -438,6 +441,9 @@ char *g_arch_operand_build_tooltip(const GArchOperand *operand, const GLoadedBin
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : operand = opérande à venir modifier. *
diff --git a/src/arch/operand.h b/src/arch/operand.h
index a93e898..62d2969 100644
--- a/src/arch/operand.h
+++ b/src/arch/operand.h
@@ -88,9 +88,13 @@ GArchOperand *g_arch_operand_get_inner_operand_from_path(const GArchOperand *, c
/* Traduit un opérande en version humainement lisible. */
void g_arch_operand_print(const GArchOperand *, GBufferLine *);
+#ifdef HAVE_GTK_SUPPORT
+
/* Construit un petit résumé concis de l'opérande. */
char *g_arch_operand_build_tooltip(const GArchOperand *, const GLoadedBinary *);
+#endif
+
/* Ajoute une information complémentaire à un opérande. */
bool g_arch_operand_set_flag(GArchOperand *, ArchOperandFlag);
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.c b/src/arch/operands/immediate.c
index 0df8bbb..9cb60a1 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 HAVE_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 HAVE_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 HAVE_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 152bdac..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"
diff --git a/src/arch/operands/target.c b/src/arch/operands/target.c
index 068d060..e33e1ee 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 HAVE_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 HAVE_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 HAVE_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. *