aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/memory.c b/memory.c
index 573fa6e5f6..284894b135 100644
--- a/memory.c
+++ b/memory.c
@@ -2588,13 +2588,24 @@ static void mtree_print_flatview(fprintf_function p, void *f,
while (n--) {
mr = range->mr;
- p(f, MTREE_INDENT TARGET_FMT_plx "-"
- TARGET_FMT_plx " (prio %d, %s): %s\n",
- int128_get64(range->addr.start),
- int128_get64(range->addr.start) + MR_SIZE(range->addr.size),
- mr->priority,
- memory_region_type(mr),
- memory_region_name(mr));
+ if (range->offset_in_region) {
+ p(f, MTREE_INDENT TARGET_FMT_plx "-"
+ TARGET_FMT_plx " (prio %d, %s): %s @" TARGET_FMT_plx "\n",
+ int128_get64(range->addr.start),
+ int128_get64(range->addr.start) + MR_SIZE(range->addr.size),
+ mr->priority,
+ range->readonly ? "rom" : memory_region_type(mr),
+ memory_region_name(mr),
+ range->offset_in_region);
+ } else {
+ p(f, MTREE_INDENT TARGET_FMT_plx "-"
+ TARGET_FMT_plx " (prio %d, %s): %s\n",
+ int128_get64(range->addr.start),
+ int128_get64(range->addr.start) + MR_SIZE(range->addr.size),
+ mr->priority,
+ range->readonly ? "rom" : memory_region_type(mr),
+ memory_region_name(mr));
+ }
range++;
}