[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 16:04:35 PDT 2023
bulbazord accepted this revision.
bulbazord added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/examples/python/crashlog.py:493
self.images = list()
+ self.crashlog = CrashLog(debugger, self.path, self.verbose)
----------------
Any reason you moved this?
================
Comment at: lldb/examples/python/crashlog.py:552-553
def parse_process_info(self, json_data):
self.crashlog.process_id = json_data["pid"]
self.crashlog.process_identifier = json_data["procName"]
+ if "procPath" in json_data:
----------------
I assume "pid" and "procName" are not optional right? Maybe not in this one but in a follow-up we can add some error handling here.
================
Comment at: lldb/examples/python/crashlog.py:1373-1374
+ arch = crashlog.process_arch
+ if not arch:
+ arch = platform.machine()
+ target = debugger.CreateTargetWithFileAndArch(None, arch)
----------------
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...
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