summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/status.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/gui/status.c b/src/gui/status.c
index 2633ba6..3a96ea1 100644
--- a/src/gui/status.c
+++ b/src/gui/status.c
@@ -75,7 +75,7 @@ static void g_status_info_finalize(GStatusInfo *);
static void update_status_info_for_view(GStatusInfo *, GtkViewPanel *);
/* Imprime la position du parcours courant dans le statut. */
-static void track_caret_address_on_buffer_views(GtkBufferView *, vmpa_t, GStatusInfo *);
+static void track_caret_address_on_buffer_views(GtkBufferView *, const vmpa2t *, GStatusInfo *);
/* Concentre l'attention de l'ensemble sur une adresse donnée. */
static void focus_address_in_status_info(GStatusInfo *, GLoadedBinary *, const vmpa2t *);
@@ -267,24 +267,42 @@ static void update_status_info_for_view(GStatusInfo *info, GtkViewPanel *view)
* *
******************************************************************************/
-static void track_caret_address_on_buffer_views(GtkBufferView *view, vmpa_t addr, GStatusInfo *info)
+static void track_caret_address_on_buffer_views(GtkBufferView *view, const vmpa2t *addr, GStatusInfo *info)
{
GEditorItem *item; /* Autre version de l'élément */
- char *msg; /* Message à transmettre */
- char tmp[VMPA_MAX_SIZE]; /* Zone de conversion */
GLoadedBinary *binary; /* Binaire courant */
- GExeFormat *format; /* Format associé au binaire */
+ GExeFormat *format; /* Format du fichier binaire */
+ GArchProcessor *proc; /* Architecture du binaire */
+ MemoryDataSize msize; /* Taille par défaut */
+ char *msg; /* Message à transmettre */
+ VMPA_BUFFER(conv); /* Zone de conversion */
+
vmpa_t rel; /* Adresse relative à un symb. */
const char *label; /* Désignation d'un symbole */
item = G_EDITOR_ITEM(info);
+ binary = g_editor_item_get_current_binary(item);
+ format = g_loaded_binary_get_format(binary);
+ proc = get_arch_processor_from_format(format);
+
/* Adresse brute */
- msg = strdup(_("Address "));
+ msize = g_arch_processor_get_memory_size(proc);
- snprintf(tmp, VMPA_MAX_SIZE, VMPA_FMT_LONG, addr);
- msg = stradd(msg, tmp);
+ msg = strdup(_("Location phys:"));
+
+ vmpa2_phys_to_string(addr, msize, conv, NULL);
+ msg = stradd(msg, conv);
+
+ msg = stradd(msg, " virt:");
+
+ vmpa2_virt_to_string(addr, msize, conv, NULL);
+ msg = stradd(msg, conv);
+
+
+
+#if 0
/* Relation avec les symboles */
@@ -304,6 +322,9 @@ static void track_caret_address_on_buffer_views(GtkBufferView *view, vmpa_t addr
}
+#endif
+
+
/* Impression */
if (info->msg_id > 0)