[Lldb-commits] [lldb] [LLDB][Minidump] Support minidumps where there are multiple exception streams (PR #97470)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 9 00:09:56 PDT 2024


================
@@ -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


More information about the lldb-commits mailing list