summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/panels/symbols.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c
index a4ee454..385bfad 100644
--- a/src/gui/panels/symbols.c
+++ b/src/gui/panels/symbols.c
@@ -770,7 +770,7 @@ static void reload_symbols_for_new_list_view(const GSymbolsPanel *panel, GtkStat
GtkTreeStore *store; /* Modèle de gestion */
GExeFormat *format; /* Format associé au binaire */
GArchProcessor *proc; /* Architecture utilisée */
- MemoryDataSize size; /* Taille des localisations */
+ bool has_virt; /* Concept de virtuel présent ?*/
sym_iter_t *siter; /* Parcours des symboles */
GBinSymbol *symbol; /* Symbole manipulé */
cairo_surface_t *icon; /* Image associée au symbole */
@@ -789,7 +789,7 @@ static void reload_symbols_for_new_list_view(const GSymbolsPanel *panel, GtkStat
format = g_loaded_binary_get_format(panel->binary);
proc = g_loaded_binary_get_processor(panel->binary);
- size = g_arch_processor_get_memory_size(proc);
+ has_virt = g_arch_processor_has_virtual_space(proc);
g_object_unref(G_OBJECT(proc));
siter = create_symbol_iterator(G_BIN_FORMAT(format), 0);
@@ -827,7 +827,11 @@ static void reload_symbols_for_new_list_view(const GSymbolsPanel *panel, GtkStat
free(original);
addr = get_mrange_addr(g_binary_symbol_get_range(symbol));
- vmpa2_virt_to_string(addr, size, virt, NULL);
+
+ if (has_virt)
+ vmpa2_virt_to_string(addr, MDS_UNDEFINED, virt, NULL);
+ else
+ vmpa2_phys_to_string(addr, MDS_UNDEFINED, virt, NULL);
gtk_tree_store_append(store, &iter, NULL);
gtk_tree_store_set(store, &iter,
@@ -1045,7 +1049,7 @@ static void reload_symbols_for_new_tree_view(const GSymbolsPanel *panel, GtkStat
GtkTreeStore *store; /* Modèle de gestion */
GExeFormat *format; /* Format associé au binaire */
GArchProcessor *proc; /* Architecture utilisée */
- MemoryDataSize size; /* Taille des localisations */
+ bool has_virt; /* Concept de virtuel présent ?*/
sym_iter_t *siter; /* Parcours des symboles */
GBinSymbol *symbol; /* Symbole manipulé */
cairo_surface_t *icon; /* Image associée au symbole */
@@ -1066,7 +1070,7 @@ static void reload_symbols_for_new_tree_view(const GSymbolsPanel *panel, GtkStat
format = g_loaded_binary_get_format(panel->binary);
proc = g_loaded_binary_get_processor(panel->binary);
- size = g_arch_processor_get_memory_size(proc);
+ has_virt = g_arch_processor_has_virtual_space(proc);
g_object_unref(G_OBJECT(proc));
siter = create_symbol_iterator(G_BIN_FORMAT(format), 0);
@@ -1115,7 +1119,11 @@ static void reload_symbols_for_new_tree_view(const GSymbolsPanel *panel, GtkStat
name = NULL;
addr = get_mrange_addr(g_binary_symbol_get_range(symbol));
- vmpa2_virt_to_string(addr, size, virt, NULL);
+
+ if (has_virt)
+ vmpa2_virt_to_string(addr, MDS_UNDEFINED, virt, NULL);
+ else
+ vmpa2_phys_to_string(addr, MDS_UNDEFINED, virt, NULL);
gtk_tree_store_set(store, &iter,
SBC_SYMBOL, symbol,