From: Derek Hower Date: Sat, 18 Jul 2009 21:58:33 +0000 (-0500) Subject: ruby: better debug print for DataBlock X-Git-Tag: Calvin_Submission~217 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=340845b13989d4823a524521f0345ecb32f10894;p=gem5.git ruby: better debug print for DataBlock --- diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index 2a0811f76..ccd73c36b 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -108,8 +108,8 @@ void DataBlock::print(ostream& out) const { int size = RubySystem::getBlockSizeBytes(); out << "[ "; - for (int i = 0; i < size; i+=4) { - out << hex << *((uint32*)(&(m_data[i]))) << " "; + for (int i = 0; i < size; i++) { + out << setw(2) << setfill('0') << hex << "0x" << (int)m_data[i] << " "; } out << dec << "]" << flush; }