summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-02-26 22:27:09 +0000
committerJason Molenda <jmolenda@apple.com>2014-02-26 22:27:09 +0000
commitd84f606debd1d4f229d870ce8c29eb3871f84c67 (patch)
treeebefe1cdfba17af5068914fa442f15cc955ab552 /lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
parent554256ca569a8e3d9e76a91fbad35db325df4282 (diff)
downloadbcm5719-llvm-d84f606debd1d4f229d870ce8c29eb3871f84c67.tar.gz
bcm5719-llvm-d84f606debd1d4f229d870ce8c29eb3871f84c67.zip
Small fix for i386 extended backtraces; wasn't skipping a
4-byte reserved area when reading the libBacktraceRecording API results. Also, add a little logging about queues being created. <rdar://problem/16127752> llvm-svn: 202306
Diffstat (limited to 'lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp')
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
index 403408fbc6f..838757bdb2c 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
@@ -621,6 +621,7 @@ SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR (lldb::addr_t queues_buffer, uint
{
Error error;
DataBufferHeap data (queues_buffer_size, 0);
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_SYSTEM_RUNTIME));
if (m_process->ReadMemory (queues_buffer, data.GetBytes(), queues_buffer_size, error) == queues_buffer_size && error.Success())
{
// We've read the information out of inferior memory; free it on the next call we make
@@ -648,11 +649,8 @@ SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR (lldb::addr_t queues_buffer, uint
offset_t start_of_this_item = offset;
uint32_t offset_to_next = extractor.GetU32 (&offset);
- /* on 64-bit architectures, the pointer will be 8-byte aligned so there's 4 bytes of
- * padding between these fields.
- */
- if (m_process->GetAddressByteSize() == 8)
- offset += 4;
+
+ offset += 4; // Skip over the 4 bytes of reserved space
addr_t queue = extractor.GetPointer (&offset);
uint64_t serialnum = extractor.GetU64 (&offset);
uint32_t running_work_items_count = extractor.GetU32 (&offset);
@@ -667,6 +665,9 @@ SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR (lldb::addr_t queues_buffer, uint
offset_t start_of_next_item = start_of_this_item + offset_to_next;
offset = start_of_next_item;
+ if (log)
+ log->Printf ("SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR added queue with dispatch_queue_t 0x%" PRIx64 ", serial number 0x%" PRIx64 ", running items %d, pending items %d, name '%s'", queue, serialnum, running_work_items_count, pending_work_items_count, queue_label);
+
QueueSP queue_sp (new Queue (m_process->shared_from_this(), serialnum, queue_label));
queue_sp->SetNumRunningWorkItems (running_work_items_count);
queue_sp->SetNumPendingWorkItems (pending_work_items_count);
OpenPOWER on IntegriCloud