diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-06-22 16:10:31 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-06-29 12:30:19 +0200 |
commit | c17fdfd053b9520309a45a79b949a610a74efd3e (patch) | |
tree | 785cded367b254d59d2c8dd2ecd943ad3cdc8250 /server/red_memslots.c | |
parent | 7e26ff3c2631a232ea3bc20ed842c47cc5db7526 (diff) | |
download | spice-c17fdfd053b9520309a45a79b949a610a74efd3e.tar.gz spice-c17fdfd053b9520309a45a79b949a610a74efd3e.tar.xz spice-c17fdfd053b9520309a45a79b949a610a74efd3e.zip |
improve memory slot error logging.
Diffstat (limited to 'server/red_memslots.c')
-rw-r--r-- | server/red_memslots.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/server/red_memslots.c b/server/red_memslots.c index bc428d53..8c9810d8 100644 --- a/server/red_memslots.c +++ b/server/red_memslots.c @@ -80,9 +80,11 @@ void validate_virt(RedMemSlotInfo *info, unsigned long virt, int slot_id, if (virt < slot->virt_start_addr || (virt + add_size) > slot->virt_end_addr) { print_memslots(info); - PANIC("virtual address out of range 0x%lx 0x%lx %d %d 0x%lx 0x%lx 0x%lx", virt, - slot->address_delta, slot_id, group_id, slot->virt_start_addr, slot->virt_end_addr, - virt + add_size); + PANIC("virtual address out of range\n" + " virt=0x%lx+0x%x slot_id=%d group_id=%d\n" + " slot=0x%lx-0x%lx delta=0x%lx", + virt, add_size, slot_id, group_id, + slot->virt_start_addr, slot->virt_end_addr, slot->address_delta); } } @@ -101,7 +103,8 @@ unsigned long get_virt(RedMemSlotInfo *info, unsigned long addr, uint32_t add_si slot_id = get_memslot_id(info, addr); if (slot_id > info->num_memslots) { - PANIC("slot_id too big"); + print_memslots(info); + PANIC("slot_id too big, addr=%lx", addr); } slot = &info->mem_slots[group_id][slot_id]; |