Author: jmolenda Date: Fri Jan 8 17:16:03 2016 New Revision: 257229 URL: http://llvm.org/viewvc/llvm-project?rev=257229&view=rev Log: In the questionmark packet ("T"), print the "threads:" and "thread-pcs:" keys before we print the libdispatch queues keys (qname, qkind, qserialnum) to make it easier to read the packet by hand. No function difference, just reordering the keys in the output.
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=257229&r1=257228&r2=257229&view=diff ============================================================================== --- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original) +++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Fri Jan 8 17:16:03 2016 @@ -2700,36 +2700,6 @@ RNBRemote::SendStopReplyPacketForThread } } - thread_identifier_info_data_t thread_ident_info; - if (DNBThreadGetIdentifierInfo (pid, tid, &thread_ident_info)) - { - if (thread_ident_info.dispatch_qaddr != 0) - { - ostrm << "qaddr:" << std::hex << thread_ident_info.dispatch_qaddr << ';'; - const DispatchQueueOffsets *dispatch_queue_offsets = GetDispatchQueueOffsets(); - if (dispatch_queue_offsets) - { - std::string queue_name; - uint64_t queue_width = 0; - uint64_t queue_serialnum = 0; - dispatch_queue_offsets->GetThreadQueueInfo(pid, thread_ident_info.dispatch_qaddr, queue_name, queue_width, queue_serialnum); - if (!queue_name.empty()) - { - ostrm << "qname:"; - append_hex_value(ostrm, queue_name.data(), queue_name.size(), false); - ostrm << ';'; - } - if (queue_width == 1) - ostrm << "qkind:serial;"; - else if (queue_width > 1) - ostrm << "qkind:concurrent;"; - - if (queue_serialnum > 0) - ostrm << "qserialnum:" << DECIMAL << queue_serialnum << ';'; - } - } - } - // If a 'QListThreadsInStopReply' was sent to enable this feature, we // will send all thread IDs back in the "threads" key whose value is // a list of hex thread IDs separated by commas: @@ -2812,6 +2782,36 @@ RNBRemote::SendStopReplyPacketForThread } + thread_identifier_info_data_t thread_ident_info; + if (DNBThreadGetIdentifierInfo (pid, tid, &thread_ident_info)) + { + if (thread_ident_info.dispatch_qaddr != 0) + { + ostrm << "qaddr:" << std::hex << thread_ident_info.dispatch_qaddr << ';'; + const DispatchQueueOffsets *dispatch_queue_offsets = GetDispatchQueueOffsets(); + if (dispatch_queue_offsets) + { + std::string queue_name; + uint64_t queue_width = 0; + uint64_t queue_serialnum = 0; + dispatch_queue_offsets->GetThreadQueueInfo(pid, thread_ident_info.dispatch_qaddr, queue_name, queue_width, queue_serialnum); + if (!queue_name.empty()) + { + ostrm << "qname:"; + append_hex_value(ostrm, queue_name.data(), queue_name.size(), false); + ostrm << ';'; + } + if (queue_width == 1) + ostrm << "qkind:serial;"; + else if (queue_width > 1) + ostrm << "qkind:concurrent;"; + + if (queue_serialnum > 0) + ostrm << "qserialnum:" << DECIMAL << queue_serialnum << ';'; + } + } + } + if (g_num_reg_entries == 0) InitializeRegisters (); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits