From b71ddfd3d9bc02ee17da55a8672749fa4bab51d5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar <daniel@zuster.org> Date: Sun, 2 Aug 2009 23:09:31 +0000 Subject: Print allocation info for adjacent objects in out-of-bounds message. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77922 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Core/Executor.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/Core/Executor.cpp') diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 8338cb92..e17d8d93 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -506,7 +506,6 @@ void Executor::initializeGlobals(ExecutionState &state) { // XXX - DWD - hardcode some things until we decide how to fix. #ifndef WINDOWS - // TODO: is it 64-bit clean ? if (i->getName() == "_ZTVN10__cxxabiv117__class_type_infoE") { size = 0x2C; } else if (i->getName() == "_ZTVN10__cxxabiv120__si_class_type_infoE") { @@ -2412,8 +2411,11 @@ std::string Executor::getAddressInfo(ExecutionState &state, info << "none\n"; } else { const MemoryObject *mo = lower->first; + std::string alloc_info; + mo->getAllocInfo(alloc_info); info << "object at " << mo->address - << " of size " << mo->size << "\n"; + << " of size " << mo->size << "\n" + << "\t\t" << alloc_info << "\n"; } if (lower!=state.addressSpace.objects.begin()) { --lower; @@ -2422,8 +2424,11 @@ std::string Executor::getAddressInfo(ExecutionState &state, info << "none\n"; } else { const MemoryObject *mo = lower->first; + std::string alloc_info; + mo->getAllocInfo(alloc_info); info << "object at " << mo->address - << " of size " << mo->size << "\n"; + << " of size " << mo->size << "\n" + << "\t\t" << alloc_info << "\n"; } } -- cgit 1.4.1