summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-11-01 20:31:29 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-11-01 20:31:29 (GMT)
commit67c0fe6eddda7ac5ff591ec972425095209d75ff (patch)
treed2f923845545c9b7f94968e9b9ded7539f3dbb7b /src/gui
parent085fef16a819cb321fd38e7e0926d3cca863777a (diff)
Moved the caret with mouse and keyboard.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@417 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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)