From: Andreas Sandberg Date: Sat, 23 May 2015 12:37:22 +0000 (+0100) Subject: kvm: Fix dumping code for large registers X-Git-Tag: stable_2015_09_03~32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5435f25ec80ff691c4e42e06888c60a01848a31d;p=gem5.git 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. --- 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) {