summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkblockdisplay.c50
1 files changed, 8 insertions, 42 deletions
diff --git a/src/gtkext/gtkblockdisplay.c b/src/gtkext/gtkblockdisplay.c
index 9698ee5..b39b561 100644
--- a/src/gtkext/gtkblockdisplay.c
+++ b/src/gtkext/gtkblockdisplay.c
@@ -25,7 +25,7 @@
#include "gtkbufferdisplay-int.h"
-#include "../arch/target.h"
+#include "../arch/operand.h"
@@ -287,11 +287,6 @@ static gboolean gtk_block_display_query_tooltip(GtkWidget *widget, gint x, gint
gint real_x; /* Abscisse absolue réelle */
gint real_y; /* Ordonnée absolue réelle */
GObject *creator; /* Origine du segment pointé */
- GBinSymbol *symbol; /* Eventuel symbole survolé */
- GTargetOperand *operand; /* Operande associé */
- phys_t diff; /* Différence avec la base */
- SymbolType stype; /* Type de symbole identifié */
- GBinRoutine *routine; /* Routine à manipuler */
char *info; /* Information à faire paraître*/
if (keyboard) return FALSE;
@@ -309,49 +304,20 @@ static gboolean gtk_block_display_query_tooltip(GtkWidget *widget, gint x, gint
if (creator != NULL)
{
- symbol = NULL;
+ if (G_IS_ARCH_OPERAND(creator))
+ info = g_arch_operand_build_tooltip(G_ARCH_OPERAND(creator), panel->binary);
- if (!G_IS_TARGET_OPERAND(creator))
- goto gbdqt_done;
+ else
+ info = NULL;
- operand = G_TARGET_OPERAND(creator);
-
- symbol = g_target_operand_get_symbol(operand, &diff);
-
- if (symbol == NULL || diff != 0)
- goto gbdqt_done;
-
- stype = g_binary_symbol_get_target_type(symbol);
-
- switch (stype)
- {
- case STP_ROUTINE:
- case STP_ENTRY_POINT:
-
- routine = g_binary_symbol_get_routine(symbol);
-
- info = g_binary_routine_build_tooltip(routine, panel->binary);
-
- //g_object_unref(G_OBJECT(routine));
-
- result = (info != NULL);
- break;
-
- default:
- break;
-
- }
-
- if (result)
+ if (info != NULL)
{
gtk_tooltip_set_markup(tooltip, info);
free(info);
- }
- gbdqt_done:
+ result = TRUE;
- if (symbol != NULL)
- g_object_unref(G_OBJECT(symbol));
+ }
g_object_unref(creator);