[Lldb-commits] [lldb] r199701 - Better logging for the IRExecutionUnit so that
Sean Callanan
scallanan at apple.com
Mon Jan 20 16:54:48 PST 2014
Author: spyffe
Date: Mon Jan 20 18:54:48 2014
New Revision: 199701
URL: http://llvm.org/viewvc/llvm-project?rev=199701&view=rev
Log:
Better logging for the IRExecutionUnit so that
we can see exactly what data was put where.
Modified:
lldb/trunk/source/Expression/IRExecutionUnit.cpp
Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=199701&r1=199700&r2=199701&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Mon Jan 20 18:54:48 2014
@@ -75,12 +75,7 @@ IRExecutionUnit::WriteNow (const uint8_t
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 &
{
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;
More information about the lldb-commits
mailing list