[Lldb-commits] [lldb] [lldb/crashlog] Create stackframes for non-crashed threads (PR #94262)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 3 10:19:07 PDT 2024


https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/94262

By default, the crashlog script only loads images for the crashed thread as well as the application specific thread.

Prior to using SymbolFileJSON and ObjectFileJSON, it didn't make sense to create stackframes for the non-crashed threads however now, we should still create stackframes for non-crashed threads.

This should also let the user pull the images after the process is launched, using `add-dsym`.

>From 8a60c6526184511ce347e9975bcb4c10b04ba40f Mon Sep 17 00:00:00 2001
From: Med Ismail Bennani <ismail at bennani.ma>
Date: Sat, 25 May 2024 13:28:46 -0700
Subject: [PATCH] [lldb/crashlog] Create stackframes for non-crashed threads

By default, the crashlog script only loads images for the crashed
thread as well as the application specific thread.

Prior to using SymbolFileJSON and ObjectFileJSON, it didn't make sense
to create stackframes for the non-crashed threads however now, we should
still create stackframes for non-crashed threads.

This should also let the user pull the images after the process is
launched, using `add-dsym`.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
---
 lldb/examples/python/crashlog_scripted_process.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lldb/examples/python/crashlog_scripted_process.py b/lldb/examples/python/crashlog_scripted_process.py
index 26c5c37b7371d..9fc4b09efbd4e 100644
--- a/lldb/examples/python/crashlog_scripted_process.py
+++ b/lldb/examples/python/crashlog_scripted_process.py
@@ -147,9 +147,6 @@ def resolve_stackframes(thread, addr_mask, target):
         return frames
 
     def create_stackframes(self):
-        if not (self.originating_process.options.load_all_images or self.has_crashed):
-            return None
-
         if not self.backing_thread or not len(self.backing_thread.frames):
             return None
 



More information about the lldb-commits mailing list