[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon May 20 16:18:03 PDT 2024


================
@@ -250,10 +268,12 @@ class ProcessInstanceInfo : public ProcessInfo {
   lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID;
   lldb::pid_t m_process_group_id = LLDB_INVALID_PROCESS_ID;
   lldb::pid_t m_process_session_id = LLDB_INVALID_PROCESS_ID;
-  struct timespec m_user_time {};
-  struct timespec m_system_time {};
-  struct timespec m_cumulative_user_time {};
-  struct timespec m_cumulative_system_time {};
+  std::optional<struct timespec> m_user_time = std::nullopt;
+  std::optional<struct timespec> m_system_time = std::nullopt;
+  std::optional<struct timespec> m_cumulative_user_time = std::nullopt;
+  std::optional<struct timespec> m_cumulative_system_time = std::nullopt;
----------------
clayborg wrote:

Revert all `struct timespec` optionals because we aren't checking if they have values and we can crash when calling the accessors.

https://github.com/llvm/llvm-project/pull/91544


More information about the lldb-commits mailing list