[Lldb-commits] [PATCH] D151002: [lldb] Fix process pid parsing issue

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 19 20:08:44 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGaefa8f4460d1: [lldb] Fix process pid parsing issue (authored by mib).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151002/new/

https://reviews.llvm.org/D151002

Files:
  lldb/examples/python/scripted_process/crashlog_scripted_process.py


Index: lldb/examples/python/scripted_process/crashlog_scripted_process.py
===================================================================
--- lldb/examples/python/scripted_process/crashlog_scripted_process.py
+++ lldb/examples/python/scripted_process/crashlog_scripted_process.py
@@ -11,7 +11,13 @@
 class CrashLogScriptedProcess(ScriptedProcess):
     def set_crashlog(self, crashlog):
         self.crashlog = crashlog
-        self.pid = self.crashlog.process_id
+        if self.crashlog.process_id:
+            if type(self.crashlog.process_id) is int:
+                self.pid = self.crashlog.process_id
+            elif type(self.crashlog.process_id) is str:
+                self.pid = int(self.crashlog.process_id, 0)
+            else:
+                self.pid = super().get_process_id()
         self.addr_mask = self.crashlog.addr_mask
         self.crashed_thread_idx = self.crashlog.crashed_thread_idx
         self.loaded_images = []


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151002.523982.patch
Type: text/x-patch
Size: 957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230520/a5682f13/attachment.bin>


More information about the lldb-commits mailing list