[Lldb-commits] [lldb] r257121 - Change the key name for the libdispatch queue serial number from

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 7 16:20:49 PST 2016


Author: jmolenda
Date: Thu Jan  7 18:20:48 2016
New Revision: 257121

URL: http://llvm.org/viewvc/llvm-project?rev=257121&view=rev
Log:
Change the key name for the libdispatch queue serial number from
"qserial" to "qserialnum" because "qserial" looks a lot like the
queue type (either 'serial' or 'concurrent') and can be confusing
to read through.  debugserver passes these up either in the questionmark
("T") packet, or in the response to the jThreadsInfo packet.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/tools/debugserver/source/RNBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=257121&r1=257120&r2=257121&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Jan  7 18:20:48 2016
@@ -2250,7 +2250,7 @@ ProcessGDBRemote::SetThreadStopInfo (Str
     static ConstString g_key_qaddr("qaddr");
     static ConstString g_key_queue_name("qname");
     static ConstString g_key_queue_kind("qkind");
-    static ConstString g_key_queue_serial("qserial");
+    static ConstString g_key_queue_serial_number("qserialnum");
     static ConstString g_key_registers("registers");
     static ConstString g_key_memory("memory");
     static ConstString g_key_address("address");
@@ -2272,7 +2272,7 @@ ProcessGDBRemote::SetThreadStopInfo (Str
     bool queue_vars_valid = false;
     std::string queue_name;
     QueueKind queue_kind = eQueueKindUnknown;
-    uint64_t queue_serial = 0;
+    uint64_t queue_serial_number = 0;
     // Iterate through all of the thread dictionary key/value pairs from the structured data dictionary
 
     thread_dict->ForEach([this,
@@ -2288,7 +2288,7 @@ ProcessGDBRemote::SetThreadStopInfo (Str
                           &queue_vars_valid,
                           &queue_name,
                           &queue_kind,
-                          &queue_serial]
+                          &queue_serial_number]
                           (ConstString key, StructuredData::Object* object) -> bool
     {
         if (key == g_key_tid)
@@ -2340,10 +2340,10 @@ ProcessGDBRemote::SetThreadStopInfo (Str
                 queue_kind = eQueueKindConcurrent;
             }
         }
-        else if (key == g_key_queue_serial)
+        else if (key == g_key_queue_serial_number)
         {
-            queue_serial = object->GetIntegerValue(0);
-            if (queue_serial != 0)
+            queue_serial_number = object->GetIntegerValue(0);
+            if (queue_serial_number != 0)
                 queue_vars_valid = true;
         }
         else if (key == g_key_reason)
@@ -2418,7 +2418,7 @@ ProcessGDBRemote::SetThreadStopInfo (Str
                               queue_vars_valid,
                               queue_name,
                               queue_kind,
-                              queue_serial);
+                              queue_serial_number);
 }
 
 StateType
@@ -2463,7 +2463,7 @@ ProcessGDBRemote::SetThreadStopInfo (Str
             bool queue_vars_valid = false; // says if locals below that start with "queue_" are valid
             std::string queue_name;
             QueueKind queue_kind = eQueueKindUnknown;
-            uint64_t queue_serial = 0;
+            uint64_t queue_serial_number = 0;
             ExpeditedRegisterMap expedited_register_map;
             while (stop_packet.GetNameColonValue(key, value))
             {
@@ -2577,10 +2577,10 @@ ProcessGDBRemote::SetThreadStopInfo (Str
                         queue_kind = eQueueKindConcurrent;
                     }
                 }
-                else if (key.compare("qserial") == 0)
+                else if (key.compare("qserialnum") == 0)
                 {
-                    queue_serial = StringConvert::ToUInt64 (value.c_str(), 0, 0);
-                    if (queue_serial != 0)
+                    queue_serial_number = StringConvert::ToUInt64 (value.c_str(), 0, 0);
+                    if (queue_serial_number != 0)
                         queue_vars_valid = true;
                 }
                 else if (key.compare("reason") == 0)
@@ -2680,7 +2680,7 @@ ProcessGDBRemote::SetThreadStopInfo (Str
                                                     queue_vars_valid,
                                                     queue_name,
                                                     queue_kind,
-                                                    queue_serial);
+                                                    queue_serial_number);
 
             return eStateStopped;
         }

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=257121&r1=257120&r2=257121&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Thu Jan  7 18:20:48 2016
@@ -2725,7 +2725,7 @@ RNBRemote::SendStopReplyPacketForThread
                         ostrm << "qkind:concurrent;";
 
                     if (queue_serialnum > 0)
-                        ostrm << "qserial:" << DECIMAL << queue_serialnum << ';';
+                        ostrm << "qserialnum:" << DECIMAL << queue_serialnum << ';';
                 }
             }
         }
@@ -5198,7 +5198,7 @@ RNBRemote::GetJSONThreadsInfo(bool threa
                             else if (queue_width > 1)
                                 thread_dict_sp->AddStringItem("qkind", "concurrent");
                             if (queue_serialnum > 0)
-                                thread_dict_sp->AddIntegerItem("qserial", queue_serialnum);
+                                thread_dict_sp->AddIntegerItem("qserialnum", queue_serialnum);
                         }
                     }
                 }




More information about the lldb-commits mailing list