summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/db/cdb.c1
-rwxr-xr-xsrc/format/dex/dex.c2
-rw-r--r--src/format/elf/helper_arm.c13
-rw-r--r--src/format/elf/symbols.h6
-rw-r--r--src/gtkext/gtkblockview.c2
-rw-r--r--src/gtkext/gtkbufferview-int.h7
-rw-r--r--src/gtkext/gtkbufferview.c89
-rw-r--r--src/gtkext/gtkbufferview.h8
-rw-r--r--src/gtkext/gtkgraphview.c2
-rw-r--r--src/gtkext/gtkviewpanel-int.h14
-rw-r--r--src/gtkext/gtkviewpanel.c79
11 files changed, 119 insertions, 104 deletions
diff --git a/src/analysis/db/cdb.c b/src/analysis/db/cdb.c
index d56c1fa..b96e0fe 100644
--- a/src/analysis/db/cdb.c
+++ b/src/analysis/db/cdb.c
@@ -50,6 +50,7 @@
#include "../../common/io.h"
#include "../../common/xdg.h"
#include "../../common/xml.h"
+#include "../../core/collections.h"
diff --git a/src/format/dex/dex.c b/src/format/dex/dex.c
index 476e6f5..eb78f79 100755
--- a/src/format/dex/dex.c
+++ b/src/format/dex/dex.c
@@ -28,7 +28,7 @@
#include "dex-int.h"
-#include "../format-int.h"
+#include "pool.h"
diff --git a/src/format/elf/helper_arm.c b/src/format/elf/helper_arm.c
index 7282d23..e44222f 100644
--- a/src/format/elf/helper_arm.c
+++ b/src/format/elf/helper_arm.c
@@ -21,15 +21,26 @@
*/
-#include "helper_x86.h"
+#include "helper_arm.h"
#include "elf-int.h"
+#include "symbols.h"
+#include "../mangling/demangler.h"
+
+
+
+/* symbols.c : Récupère la désignation d'un symbole donné. */
+//extern const char *get_elf_symbol_name(GElfFormat *, const elf_shdr *, const elf_shdr *, off_t);
+
+
+
+
diff --git a/src/format/elf/symbols.h b/src/format/elf/symbols.h
index a413395..634158d 100644
--- a/src/format/elf/symbols.h
+++ b/src/format/elf/symbols.h
@@ -31,6 +31,12 @@
/* Charge en mémoire la liste humaine des symboles. */
bool load_elf_symbols(GElfFormat *);
+/* Récupère la définition complète d'un symbole donné. */
+bool get_elf_symbol_by_index(GElfFormat *, const elf_shdr *, off_t, elf_sym *);
+
+/* Récupère la désignation d'un symbole donné. */
+const char *get_elf_symbol_name(GElfFormat *, const elf_shdr *, const elf_shdr *, off_t);
+
#endif /* _FORMAT_ELF_SYMBOLS_H */
diff --git a/src/gtkext/gtkblockview.c b/src/gtkext/gtkblockview.c
index 2b72ff4..5d14db2 100644
--- a/src/gtkext/gtkblockview.c
+++ b/src/gtkext/gtkblockview.c
@@ -225,7 +225,7 @@ static gboolean gtk_block_view_button_press_event(GtkBlockView *view, GdkEventBu
real_x = event->x;
real_y = event->y;
- gtk_buffer_view_compute_real_coord(bview, &real_x, &real_y);
+ gtk_view_panel_compute_real_coord(GTK_VIEW_PANEL(bview), &real_x, &real_y);
g_buffer_view_highlight_segments(gtk_buffer_view_get_buffer(bview), real_x, real_y, NULL);
diff --git a/src/gtkext/gtkbufferview-int.h b/src/gtkext/gtkbufferview-int.h
index 105d32b..944ddc7 100644
--- a/src/gtkext/gtkbufferview-int.h
+++ b/src/gtkext/gtkbufferview-int.h
@@ -70,12 +70,5 @@ struct _GtkBufferViewClass
};
-/* Transcrit les coordonnées à l'écran en coordonnées absolues. */
-void gtk_buffer_view_compute_fake_coord(GtkBufferView *, gint *, gint *);
-
-/* Transcrit les coordonnées absolues en coordonnées à l'écran. */
-void gtk_buffer_view_compute_real_coord(GtkBufferView *, gint *, gint *);
-
-
#endif /* _GTK_BUFFERVIEW_INT_H */
diff --git a/src/gtkext/gtkbufferview.c b/src/gtkext/gtkbufferview.c
index f54ecff..86a738a 100644
--- a/src/gtkext/gtkbufferview.c
+++ b/src/gtkext/gtkbufferview.c
@@ -287,7 +287,7 @@ static gboolean gtk_buffer_view_button_press(GtkWidget *widget, GdkEventButton *
real_x = event->x;
real_y = event->y;
- gtk_buffer_view_compute_real_coord(view, &real_x, &real_y);
+ gtk_view_panel_compute_real_coord(GTK_VIEW_PANEL(view), &real_x, &real_y);
printf(" !mouse! :: (%g ; %g) -> (%d ; %d)\n",
event->x, event->y,
@@ -313,54 +313,6 @@ static gboolean gtk_buffer_view_button_press(GtkWidget *widget, GdkEventButton *
/******************************************************************************
* *
-* Paramètres : view = composant GTK à consulter. *
-* event = informations liées à l'événement. *
-* *
-* Description : Transcrit les coordonnées à l'écran en coordonnées absolues. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_buffer_view_compute_fake_coord(GtkBufferView *view, gint *x, gint *y)
-{
- if (GTK_VIEW_PANEL(view)->hadjustment != NULL)
- *x -= gtk_adjustment_get_value(GTK_VIEW_PANEL(view)->hadjustment);
-
- if (GTK_VIEW_PANEL(view)->vadjustment != NULL)
- *y += gtk_adjustment_get_value(GTK_VIEW_PANEL(view)->vadjustment);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à consulter. *
-* event = informations liées à l'événement. *
-* *
-* Description : Transcrit les coordonnées absolues en coordonnées à l'écran. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_buffer_view_compute_real_coord(GtkBufferView *view, gint *x, gint *y)
-{
- if (x != NULL && GTK_VIEW_PANEL(view)->hadjustment != NULL)
- *x += gtk_adjustment_get_value(GTK_VIEW_PANEL(view)->hadjustment);
-
- if (y != NULL && GTK_VIEW_PANEL(view)->vadjustment != NULL)
- *y += gtk_adjustment_get_value(GTK_VIEW_PANEL(view)->vadjustment);
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : widget = composant GTK à redessiner. *
* cr = contexte graphique associé à l'événement. *
* *
@@ -420,7 +372,7 @@ static gboolean gtk_buffer_view_draw(GtkWidget *widget, cairo_t *cr)
{
fake_x = 0;
fake_y = 0;
- gtk_buffer_view_compute_fake_coord(view, &fake_x, &fake_y);
+ gtk_view_panel_compute_fake_coord(GTK_VIEW_PANEL(view), &fake_x, &fake_y);
g_generic_config_get_value(get_main_configuration(), MPK_SELECTION_LINE, &sel_line);
sel_line &= gtk_widget_has_focus(widget);
@@ -806,39 +758,6 @@ GBufferView *gtk_buffer_view_get_buffer(const GtkBufferView *view)
-
-
-/* ---------------------------------------------------------------------------------- */
-/* CONVERSIONS DE COORDONNEES */
-/* ---------------------------------------------------------------------------------- */
-
-
-/******************************************************************************
-* *
-* Paramètres : view = composant GTK à consulter. *
-* x = abscisse à ajuster. [OUT] *
-* x = ordonnée à ajuster. [OUT] *
-* *
-* Description : Transcrit les coordonnées absolues en coordonnées à l'écran. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void gtk_buffer_view_compute_relative_coords(GtkBufferView *view, gint *x, gint *y)
-{
- if (x != NULL && GTK_VIEW_PANEL(view)->hadjustment != NULL)
- *x -= gtk_adjustment_get_value(GTK_VIEW_PANEL(view)->hadjustment);
-
- if (y != NULL && GTK_VIEW_PANEL(view)->vadjustment != NULL)
- *y -= gtk_adjustment_get_value(GTK_VIEW_PANEL(view)->vadjustment);
-
-}
-
-
-
/* ---------------------------------------------------------------------------------- */
/* ANIMATION DU CURSEUR */
/* ---------------------------------------------------------------------------------- */
@@ -963,7 +882,7 @@ static void gtk_buffer_view_relocate_caret(GtkBufferView *view, const GdkRectang
else if (clear_old)
{
- gtk_buffer_view_compute_relative_coords(view, &old_area.x, &old_area.y);
+ gtk_view_panel_compute_relative_coords(GTK_VIEW_PANEL(view), &old_area.x, &old_area.y);
gtk_widget_queue_draw_area(GTK_WIDGET(view), old_area.x, old_area.y,
old_area.width, old_area.height);
@@ -1063,7 +982,7 @@ static gboolean gtk_buffer_view_refresh_caret(GtkBufferView *view)
}
area = view->caret;
- gtk_buffer_view_compute_relative_coords(view, &area.x, &area.y);
+ gtk_view_panel_compute_relative_coords(GTK_VIEW_PANEL(view), &area.x, &area.y);
/* Réinitialisation de la surface */
if (view->show_caret)
diff --git a/src/gtkext/gtkbufferview.h b/src/gtkext/gtkbufferview.h
index ed26fd5..6b5cf30 100644
--- a/src/gtkext/gtkbufferview.h
+++ b/src/gtkext/gtkbufferview.h
@@ -59,14 +59,6 @@ GBufferView *gtk_buffer_view_get_buffer(const GtkBufferView *);
-/* --------------------------- CONVERSIONS DE COORDONNEES --------------------------- */
-
-
-/* Transcrit les coordonnées absolues en coordonnées à l'écran. */
-void gtk_buffer_view_compute_relative_coords(GtkBufferView *, gint *, gint *);
-
-
-
/* ------------------------------ ANIMATION DU CURSEUR ------------------------------ */
diff --git a/src/gtkext/gtkgraphview.c b/src/gtkext/gtkgraphview.c
index 46a82eb..3c117d9 100644
--- a/src/gtkext/gtkgraphview.c
+++ b/src/gtkext/gtkgraphview.c
@@ -240,7 +240,7 @@ static void gtk_graph_view_adjust_scroll_value(GtkGraphView *view, GtkAdjustment
fake_x = 0;
fake_y = 0;
- gtk_buffer_view_compute_fake_coord(view, &fake_x, &fake_y);
+ gtk_view_panel_compute_fake_coord(GTK_VIEW_PANEL(view), &fake_x, &fake_y);
gtk_fixed_move(GTK_FIXED(view), GTK_WIDGET(view->support), fake_x, -fake_y);
diff --git a/src/gtkext/gtkviewpanel-int.h b/src/gtkext/gtkviewpanel-int.h
index 10ae933..e51dbac 100644
--- a/src/gtkext/gtkviewpanel-int.h
+++ b/src/gtkext/gtkviewpanel-int.h
@@ -112,4 +112,18 @@ typedef enum _ViewPanelProps
+/* --------------------------- CONVERSIONS DE COORDONNEES --------------------------- */
+
+
+/* Transcrit les coordonnées à l'écran en coordonnées absolues. */
+void gtk_view_panel_compute_fake_coord(GtkViewPanel *, gint *, gint *);
+
+/* Transcrit les coordonnées absolues en coordonnées à l'écran. */
+void gtk_view_panel_compute_real_coord(GtkViewPanel *, gint *, gint *);
+
+/* Transcrit les coordonnées absolues en coordonnées à l'écran. */
+void gtk_view_panel_compute_relative_coords(GtkViewPanel *, gint *, gint *);
+
+
+
#endif /* _GTK_VIEWPANEL_INT_H */
diff --git a/src/gtkext/gtkviewpanel.c b/src/gtkext/gtkviewpanel.c
index 574bf22..03f6daa 100644
--- a/src/gtkext/gtkviewpanel.c
+++ b/src/gtkext/gtkviewpanel.c
@@ -961,3 +961,82 @@ void gtk_view_panel_cache_glance(GtkViewPanel *panel, cairo_t *cairo, const GtkA
GTK_VIEW_PANEL_GET_CLASS(panel)->cache_glance(panel, cairo, area, scale);
}
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/* CONVERSIONS DE COORDONNEES */
+/* ---------------------------------------------------------------------------------- */
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = composant GTK à consulter. *
+* event = informations liées à l'événement. *
+* *
+* Description : Transcrit les coordonnées à l'écran en coordonnées absolues. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void gtk_view_panel_compute_fake_coord(GtkViewPanel *panel, gint *x, gint *y)
+{
+ if (panel->hadjustment != NULL)
+ *x -= gtk_adjustment_get_value(panel->hadjustment);
+
+ if (panel->vadjustment != NULL)
+ *y += gtk_adjustment_get_value(panel->vadjustment);
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = composant GTK à consulter. *
+* event = informations liées à l'événement. *
+* *
+* Description : Transcrit les coordonnées absolues en coordonnées à l'écran. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void gtk_view_panel_compute_real_coord(GtkViewPanel *panel, gint *x, gint *y)
+{
+ if (x != NULL && panel->hadjustment != NULL)
+ *x += gtk_adjustment_get_value(panel->hadjustment);
+
+ if (y != NULL && panel->vadjustment != NULL)
+ *y += gtk_adjustment_get_value(panel->vadjustment);
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : panel = composant GTK à consulter. *
+* x = abscisse à ajuster. [OUT] *
+* x = ordonnée à ajuster. [OUT] *
+* *
+* Description : Transcrit les coordonnées absolues en coordonnées à l'écran. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void gtk_view_panel_compute_relative_coords(GtkViewPanel *panel, gint *x, gint *y)
+{
+ if (x != NULL && panel->hadjustment != NULL)
+ *x -= gtk_adjustment_get_value(panel->hadjustment);
+
+ if (y != NULL && panel->vadjustment != NULL)
+ *y -= gtk_adjustment_get_value(panel->vadjustment);
+
+}