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

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 31 15:47:19 PDT 2023


mib created this revision.
mib added reviewers: bulbazord, JDevlieghere.
mib added a project: LLDB.
Herald added a project: All.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.

This patch changes the way we load a crash report into a scripted
process by creating a empty target.

To do so, it parses the architecture information from the report (for
both the legacy and json format) and uses that to create a target that
doesn't have any executable, like what we do when attaching to a process.

For the legacy format, we mostly rely on the `Code Type` line, since the
architure is an optional field on the `Binary Images` sections.

However for the json format, we first try to get the architecture while
parsing the image dictionary if we couldn't find it, we try to infer it
using the "flavor" key when parsing the frame's registers.

If the architecture is still not set after parsing the report, we use
the host architecture, as a fallback.

rdar://107850263

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151849

Files:
  lldb/examples/python/crashlog.py
  lldb/source/Target/Process.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151849.527220.patch
Type: text/x-patch
Size: 4761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230531/7bbf21cc/attachment.bin>


More information about the lldb-commits mailing list