[Lldb-commits] [PATCH] D11187: Add jThreadsInfo support to lldb-server

Tamas Berghammer tberghammer at google.com
Tue Jul 14 08:55:21 PDT 2015


tberghammer added a comment.

Generally looks good, but please clarify the format of the jThreads packet


================
Comment at: docs/lldb-gdb-remote.txt:1555-1575
@@ +1554,23 @@
+        "registers": {
+          "0":"8000000000000000",
+          "1":"0000000000000000",
+          "2":"20fabf5fff7f0000",
+          "3":"e8f8bf5fff7f0000",
+          "4":"0100000000000000",
+          "5":"d8f8bf5fff7f0000",
+          "6":"b0f8bf5fff7f0000",
+          "7":"20f4bf5fff7f0000",
+          "8":"8000000000000000",
+          "9":"61a8db78a61500db",
+          "10":"3200000000000000",
+          "11":"4602000000000000",
+          "12":"0000000000000000",
+          "13":"0000000000000000",
+          "14":"0000000000000000",
+          "15":"0000000000000000",
+          "16":"960b000001000000",
+          "17":"0202000000000000",
+          "18":"2b00000000000000",
+          "19":"0000000000000000",
+          "20":"0000000000000000"
+        },
----------------
What are the format of the register numbers? In the stop replay packets the register number is 2 hex digit, but here it looks like as it is decimal. If they are different then please emphasize it (until we can make it uniform)

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:470-472
@@ +469,5 @@
+
+    static constexpr int k_expedited_registers[] = {
+        LLDB_REGNUM_GENERIC_PC, LLDB_REGNUM_GENERIC_SP, LLDB_REGNUM_GENERIC_FP, LLDB_REGNUM_GENERIC_RA
+    };
+    JSONObject::SP register_object_sp (new JSONObject);
----------------
The register numbers have uint32_t types

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:473
@@ +472,3 @@
+    };
+    JSONObject::SP register_object_sp (new JSONObject);
+    for (int regnum: k_expedited_registers)
----------------
(nit): make_shared

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:506
@@ +505,3 @@
+
+        register_object_sp->SetObject(reg_num_str, JSONString::SP(new JSONString(stream.GetString())));
+    }
----------------
(nit): make_shared

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2717
@@ +2716,3 @@
+
+        JSONObject::SP thread_obj_sp (new JSONObject);
+
----------------
(nit): make_shared

================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:2761
@@ +2760,3 @@
+
+            JSONArray::SP medata_array_sp (new JSONArray);
+            for (uint32_t i = 0; i < tid_stop_info.details.exception.data_count; ++i)
----------------
(nit): make_shared


http://reviews.llvm.org/D11187







More information about the lldb-commits mailing list