diff options
author | Sean Callanan <scallanan@apple.com> | 2014-01-21 00:54:48 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2014-01-21 00:54:48 +0000 |
commit | 4f2c198617bcd36f3abe462d214cab5c23690239 (patch) | |
tree | 1315b12328fb463847d5d0fd241d5fb098d1712d /lldb/source/Expression/IRExecutionUnit.cpp | |
parent | e25ffdf8a18a4b20c6bab43b25687c0143473853 (diff) | |
download | bcm5719-llvm-4f2c198617bcd36f3abe462d214cab5c23690239.tar.gz bcm5719-llvm-4f2c198617bcd36f3abe462d214cab5c23690239.zip |
Better logging for the IRExecutionUnit so that
we can see exactly what data was put where.
llvm-svn: 199701
Diffstat (limited to 'lldb/source/Expression/IRExecutionUnit.cpp')
-rw-r--r-- | lldb/source/Expression/IRExecutionUnit.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
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; |