From 4f2c198617bcd36f3abe462d214cab5c23690239 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Tue, 21 Jan 2014 00:54:48 +0000 Subject: Better logging for the IRExecutionUnit so that we can see exactly what data was put where. llvm-svn: 199701 --- lldb/source/Expression/IRExecutionUnit.cpp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'lldb/source/Expression/IRExecutionUnit.cpp') diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp index 104732a283c..4d5c78e19b5 100644 --- a/lldb/source/Expression/IRExecutionUnit.cpp +++ b/lldb/source/Expression/IRExecutionUnit.cpp @@ -75,12 +75,7 @@ IRExecutionUnit::WriteNow (const uint8_t *bytes, if (err.Success()) { DataExtractor my_extractor(my_buffer.GetBytes(), my_buffer.GetByteSize(), lldb::eByteOrderBig, 8); - - StreamString ss; - - my_extractor.Dump(&ss, 0, lldb::eFormatBytesWithASCII, 1, my_buffer.GetByteSize(), 32, allocation_process_addr, 0, 0); - - log->PutCString(ss.GetData()); + my_extractor.PutToLog(log, 0, my_buffer.GetByteSize(), allocation_process_addr, 16, DataExtractor::TypeUInt8); } } @@ -394,6 +389,25 @@ IRExecutionUnit::GetRunnableInfo(Error &error, { log->Printf("Function disassembly:\n%s", disassembly_stream.GetData()); } + + log->Printf("Sections: "); + for (AllocationRecord &record : m_records) + { + if (record.m_process_address != LLDB_INVALID_ADDRESS) + { + record.dump(log); + + DataBufferHeap my_buffer(record.m_size, 0); + Error err; + ReadMemory(my_buffer.GetBytes(), record.m_process_address, record.m_size, err); + + if (err.Success()) + { + DataExtractor my_extractor(my_buffer.GetBytes(), my_buffer.GetByteSize(), lldb::eByteOrderBig, 8); + my_extractor.PutToLog(log, 0, my_buffer.GetByteSize(), record.m_process_address, 16, DataExtractor::TypeUInt8); + } + } + } } func_addr = m_function_load_addr; -- cgit v1.2.3