From 5435f25ec80ff691c4e42e06888c60a01848a31d Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Sat, 23 May 2015 13:37:22 +0100 Subject: [PATCH] kvm: Fix dumping code for large registers The register dumping code in kvm tries to print the bytes in large registers (128 bits and larger) instead of printing them as hex. This changeset fixes that. --- src/cpu/kvm/base.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc index e09c4b7f2..abb3451f6 100644 --- a/src/cpu/kvm/base.cc +++ b/src/cpu/kvm/base.cc @@ -816,14 +816,14 @@ BaseKvmCPU::getAndFormatOneReg(uint64_t id) const ss << value; \ } break -#define HANDLE_ARRAY(len) \ - case KVM_REG_SIZE_U ## len: { \ - uint8_t value[len / 8]; \ - getOneReg(id, value); \ - ss << "[" << value[0]; \ - for (int i = 1; i < len / 8; ++i) \ - ss << ", " << value[i]; \ - ss << "]"; \ +#define HANDLE_ARRAY(len) \ + case KVM_REG_SIZE_U ## len: { \ + uint8_t value[len / 8]; \ + getOneReg(id, value); \ + ccprintf(ss, "[0x%x", value[0]); \ + for (int i = 1; i < len / 8; ++i) \ + ccprintf(ss, ", 0x%x", value[i]); \ + ccprintf(ss, "]"); \ } break switch (id & KVM_REG_SIZE_MASK) { -- 2.30.2