summaryrefslogtreecommitdiff
path: root/src/glibext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-01-05 21:32:22 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-01-05 21:32:22 (GMT)
commit5c88982fafe33c1183479e555992c759266b708e (patch)
tree385b4fc5135197f11dc895041a484b3b842a0fc4 /src/glibext
parentabec2acca0c300ab43e3fec73602e216c078b391 (diff)
Changed the way addresses are printed.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@449 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/glibext')
-rw-r--r--src/glibext/gbufferline.c52
1 files changed, 30 insertions, 22 deletions
diff --git a/src/glibext/gbufferline.c b/src/glibext/gbufferline.c
index cd85cf4..6b5ab18 100644
--- a/src/glibext/gbufferline.c
+++ b/src/glibext/gbufferline.c
@@ -488,37 +488,45 @@ void g_buffer_line_fill_mrange(GBufferLine *line, MemoryDataSize psize, MemoryDa
/* Position physique */
- mrange_phys_to_string(&line->range, psize, true, address, &len);
+ if (has_phys_addr(get_mrange_addr(&line->range)))
+ {
+ mrange_phys_to_string(&line->range, psize, true, address, &len);
- for (i = 2; i < len; i++)
- if (address[i] != '0') break;
+ for (i = 2; i < len; i++)
+ if (address[i] != '0') break;
- if (i == len)
- g_buffer_line_insert_text(line, BLC_PHYSICAL, address, len, RTT_PHYS_ADDR_PAD);
+ if (i == len)
+ g_buffer_line_insert_text(line, BLC_PHYSICAL, address, len, RTT_PHYS_ADDR_PAD);
- else
- {
- g_buffer_line_insert_text(line, BLC_PHYSICAL, address, 2, RTT_PHYS_ADDR);
- g_buffer_line_insert_text(line, BLC_PHYSICAL, &address[2], i - 2, RTT_PHYS_ADDR_PAD);
- g_buffer_line_insert_text(line, BLC_PHYSICAL, &address[i], len - i, RTT_PHYS_ADDR);
- }
+ else
+ {
+ g_buffer_line_insert_text(line, BLC_PHYSICAL, address, 2, RTT_PHYS_ADDR);
+ g_buffer_line_insert_text(line, BLC_PHYSICAL, &address[2], i - 2, RTT_PHYS_ADDR_PAD);
+ g_buffer_line_insert_text(line, BLC_PHYSICAL, &address[i], len - i, RTT_PHYS_ADDR);
+ }
+
+ }
/* Adresse virtuelle */
- mrange_virt_to_string(&line->range, vsize, true, address, &len);
+ if (has_virt_addr(get_mrange_addr(&line->range)))
+ {
+ mrange_virt_to_string(&line->range, vsize, true, address, &len);
- for (i = 2; i < len; i++)
- if (address[i] != '0') break;
+ for (i = 2; i < len; i++)
+ if (address[i] != '0') break;
- if (i == len)
- g_buffer_line_insert_text(line, BLC_VIRTUAL, address, len, RTT_VIRT_ADDR_PAD);
+ if (i == len)
+ g_buffer_line_insert_text(line, BLC_VIRTUAL, address, len, RTT_VIRT_ADDR_PAD);
- else
- {
- g_buffer_line_insert_text(line, BLC_VIRTUAL, address, 2, RTT_VIRT_ADDR);
- g_buffer_line_insert_text(line, BLC_VIRTUAL, &address[2], i - 2, RTT_VIRT_ADDR_PAD);
- g_buffer_line_insert_text(line, BLC_VIRTUAL, &address[i], len - i, RTT_VIRT_ADDR);
- }
+ else
+ {
+ g_buffer_line_insert_text(line, BLC_VIRTUAL, address, 2, RTT_VIRT_ADDR);
+ g_buffer_line_insert_text(line, BLC_VIRTUAL, &address[2], i - 2, RTT_VIRT_ADDR_PAD);
+ g_buffer_line_insert_text(line, BLC_VIRTUAL, &address[i], len - i, RTT_VIRT_ADDR);
+ }
+
+ }
}