[Lldb-commits] [PATCH] D151849: [lldb/crashlog] Create interactive crashlog with no binary

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 31 17:00:31 PDT 2023


bulbazord added inline comments.


================
Comment at: lldb/examples/python/crashlog.py:1373-1374
+        arch = crashlog.process_arch
+        if not arch:
+            arch = platform.machine()
+        target = debugger.CreateTargetWithFileAndArch(None, arch)
----------------
mib wrote:
> bulbazord wrote:
> > The fallback of "use the host platform's architecture" seems like it could lead to some issues no? I'm not sure we can do better if the crashlog doesn't have any info about a process architecture though... 
> Do you think we shouldn't fallback to the host architecture in this case and raise an exception instead ?
That might be a better idea. For example, if you're debugging a crashlog for a different platform, lldb would make this assumption silently which can lead to strange problems that are difficult to reason about.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151849



More information about the lldb-commits mailing list