================
@@ -387,10 +399,8 @@ bool ProcessMinidump::DoUpdateThreadList(ThreadList 
&old_thread_list,
     LocationDescriptor context_location = thread.Context;
 
     // If the minidump contains an exception context, use it
-    if (m_active_exception != nullptr &&
-        m_active_exception->ThreadId == thread.ThreadId) {
-      context_location = m_active_exception->ThreadContext;
-    }
+    if (m_exceptions_by_tid.count(thread.ThreadId) > 0)
+      context_location = m_exceptions_by_tid[thread.ThreadId].ThreadContext;
----------------
labath wrote:

```suggestion
    if (auto it = m_exceptions_by_tid.find(thread.ThreadId); it != 
m_exceptions_by_tid.end())
      context_location = it->ThreadContext;
```

Avoids double container lookup. Not that it matters here, but nice to get in 
the habit of it.

https://github.com/llvm/llvm-project/pull/97470
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to