The name field of an QOM-ified AddressSpace represents a property name, which may not be sufficient to identify the AddressSpace. Use address_space_get_path() instead.
Signed-off-by: Akihiko Odaki <od...@rsg.ci.i.u-tokyo.ac.jp> --- hw/core/loader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 524af6f14a09..1ee603f19c90 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -1258,10 +1258,10 @@ static bool roms_overlap(Rom *last_rom, Rom *this_rom) last_rom->addr + last_rom->romsize > this_rom->addr; } -static const char *rom_as_name(Rom *rom) +static const char *rom_as_path(Rom *rom) { - const char *name = rom->as ? rom->as->name : NULL; - return name ?: "anonymous"; + const char *path = rom->as ? address_space_get_path(rom->as) : NULL; + return path ?: "anonymous"; } static void rom_print_overlap_error_header(void) @@ -1280,7 +1280,7 @@ static void rom_print_one_overlap_error(Rom *last_rom, Rom *rom) { error_printf( "\nThe following two regions overlap (in the %s address space):\n", - rom_as_name(rom)); + rom_as_path(rom)); error_printf( " %s (addresses 0x" HWADDR_FMT_plx " - 0x" HWADDR_FMT_plx ")\n", last_rom->name, last_rom->addr, last_rom->addr + last_rom->romsize); -- 2.51.0