summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
commit41db261acccf3494aa93b71a181cde9e8605a841 (patch)
tree07a00f88920a8e601268d415131630052ef85988 /src/analysis/disass
parentc27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff)
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/Makefile.am7
-rw-r--r--src/analysis/disass/area.h2
-rw-r--r--src/analysis/disass/block.c14
-rw-r--r--src/analysis/disass/disassembler.c6
-rw-r--r--src/analysis/disass/fetch.h2
-rw-r--r--src/analysis/disass/instructions.h2
-rw-r--r--src/analysis/disass/limit.c2
-rw-r--r--src/analysis/disass/output.h2
-rw-r--r--src/analysis/disass/routines.h2
9 files changed, 25 insertions, 14 deletions
diff --git a/src/analysis/disass/Makefile.am b/src/analysis/disass/Makefile.am
index 5631468..fe840c6 100644
--- a/src/analysis/disass/Makefile.am
+++ b/src/analysis/disass/Makefile.am
@@ -15,14 +15,9 @@ libanalysisdisass_la_SOURCES = \
rank.h rank.c \
routines.h routines.c
-libanalysisdisass_la_LDFLAGS =
+libanalysisdisass_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS)
devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%)
dev_HEADERS = $(libanalysisdisass_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
diff --git a/src/analysis/disass/area.h b/src/analysis/disass/area.h
index 12c4617..0817419 100644
--- a/src/analysis/disass/area.h
+++ b/src/analysis/disass/area.h
@@ -30,7 +30,7 @@
#include "../../format/preload.h"
#include "../../format/symbol.h"
#include "../../glibext/delayed.h"
-#include "../../gtkext/gtkstatusstack.h"
+#include "../../glibext/notifier.h"
diff --git a/src/analysis/disass/block.c b/src/analysis/disass/block.c
index ea1441f..973fd56 100644
--- a/src/analysis/disass/block.c
+++ b/src/analysis/disass/block.c
@@ -34,9 +34,9 @@
#include "../block-int.h"
#include "../../arch/instructions/raw.h"
#include "../../common/extstr.h"
+#include "../../core/columns.h"
#include "../../core/params.h"
#include "../../glibext/gbinarycursor.h"
-#include "../../gtkext/gtkblockdisplay.h"
@@ -88,12 +88,16 @@ static block_link_t *g_basic_block_get_sources(const GBasicBlock *, const GBlock
/* Fournit les détails des destinations de bloc de code. */
static block_link_t *g_basic_block_get_destinations(const GBasicBlock *, const GBlockList *, size_t *);
+#ifdef HAVE_GTK_SUPPORT
+
/* Fournit la représentation graphique d'un bloc de code. */
static GBufferView *g_basic_block_build_view(const GBasicBlock *, segcnt_list *);
/* Construit un ensemble d'indications pour bloc. */
static char *g_basic_block_build_tooltip(const GBasicBlock *);
+#endif
+
/* ---------------------------------------------------------------------------------- */
@@ -133,8 +137,10 @@ static void g_basic_block_class_init(GBasicBlockClass *class)
block->cmp_links = (block_compare_links_fc)g_basic_block_compare_links;
block->get_src = (block_get_links_fc)g_basic_block_get_sources;
block->get_dest = (block_get_links_fc)g_basic_block_get_destinations;
+#ifdef HAVE_GTK_SUPPORT
block->build = (block_build_view_fc)g_basic_block_build_view;
block->build_tooltip = (block_build_tooltip_fc)g_basic_block_build_tooltip;
+#endif
}
@@ -466,6 +472,9 @@ static block_link_t *g_basic_block_get_destinations(const GBasicBlock *block, co
}
+#ifdef HAVE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : block = bloc de code à manipuler. *
@@ -856,6 +865,9 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block)
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : block = bloc d'instructions à consulter. *
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index 4056c59..7ea127d 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -38,11 +38,11 @@
#include "routines.h"
#include "../human/asm/lang.h"
#include "../../arch/storage.h"
+#include "../../core/columns.h"
#include "../../core/global.h"
#include "../../core/params.h"
#include "../../core/nproc.h"
#include "../../glibext/generators/prologue.h"
-#include "../../gtkext/gtkblockdisplay.h"
#include "../../plugins/pglist.h"
@@ -391,7 +391,9 @@ void output_disassembly(GLoadedBinary *binary, GProcContext *context, GtkStatusS
GBinContent *content; /* Contenu bianire manipulé */
GCodingLanguage *lang; /* Langage de sortie préféré */
int offset; /* Décalage des étiquettes */
+#ifdef HAVE_GTK_SUPPORT
GWidthTracker *tracker; /* Gestionnaire de largeurs */
+#endif
char **text; /* Contenu brute à imprimer */
char *desc; /* Désignation du binaire */
const gchar *checksum; /* Identifiant de binaire */
@@ -409,9 +411,11 @@ void output_disassembly(GLoadedBinary *binary, GProcContext *context, GtkStatusS
g_generic_config_get_value(get_main_configuration(), MPK_LABEL_OFFSET, &offset);
+#ifdef HAVE_GTK_SUPPORT
tracker = g_buffer_cache_get_width_tracker(*cache);
g_width_tracker_set_column_min_width(tracker, DLC_ASSEMBLY_LABEL, offset);
g_object_unref(G_OBJECT(tracker));
+#endif
g_buffer_cache_wlock(*cache);
diff --git a/src/analysis/disass/fetch.h b/src/analysis/disass/fetch.h
index 7afabc6..44b5424 100644
--- a/src/analysis/disass/fetch.h
+++ b/src/analysis/disass/fetch.h
@@ -27,7 +27,7 @@
#include "../binary.h"
#include "../../glibext/delayed.h"
-#include "../../gtkext/gtkstatusstack.h"
+#include "../../glibext/notifier.h"
diff --git a/src/analysis/disass/instructions.h b/src/analysis/disass/instructions.h
index c0cd4ac..24fe982 100644
--- a/src/analysis/disass/instructions.h
+++ b/src/analysis/disass/instructions.h
@@ -28,7 +28,7 @@
#include "../routine.h"
#include "../../arch/processor.h"
#include "../../format/executable.h"
-#include "../../gtkext/gtkstatusstack.h"
+#include "../../glibext/notifier.h"
diff --git a/src/analysis/disass/limit.c b/src/analysis/disass/limit.c
index 1e460e0..2caefd6 100644
--- a/src/analysis/disass/limit.c
+++ b/src/analysis/disass/limit.c
@@ -76,7 +76,7 @@ void compute_routine_limit(GBinSymbol *symbol, const vmpa2t *next, GArchProcesso
/* Dans tous les cas, on va se référer à la portion contenante... */
- portion = g_binary_portion_find_at_addr(portions, &addr, (GdkRectangle []) { { 0 } });
+ portion = g_binary_portion_find_at_addr(portions, &addr);
assert(portion != NULL);
range = g_binary_portion_get_range(portion);
diff --git a/src/analysis/disass/output.h b/src/analysis/disass/output.h
index 20729d2..2213840 100644
--- a/src/analysis/disass/output.h
+++ b/src/analysis/disass/output.h
@@ -29,7 +29,7 @@
#include "../human/lang.h"
#include "../../format/preload.h"
#include "../../glibext/buffercache.h"
-#include "../../gtkext/gtkstatusstack.h"
+#include "../../glibext/notifier.h"
diff --git a/src/analysis/disass/routines.h b/src/analysis/disass/routines.h
index 9a2c308..af8e814 100644
--- a/src/analysis/disass/routines.h
+++ b/src/analysis/disass/routines.h
@@ -27,7 +27,7 @@
#include "../binary.h"
#include "../routine.h"
-#include "../../gtkext/gtkstatusstack.h"
+#include "../../glibext/notifier.h"