[Lldb-commits] [PATCH] D151844: [lldb/crashlog] Fix crash when loading non-symbolicated report
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 31 15:28:57 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 should address the crashes when parsing a the crash report
frame dictionary.
If the crash report is not symbolicated, the `symbolLocation` key will
be missing. In that case, we should just use the `imageOffset`.
rdar://109836386
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151844
Files:
lldb/examples/python/crashlog.py
Index: lldb/examples/python/crashlog.py
===================================================================
--- lldb/examples/python/crashlog.py
+++ lldb/examples/python/crashlog.py
@@ -596,9 +596,11 @@
image_addr = self.get_used_image(image_id)["base"]
pc = image_addr + frame_offset
- if "symbol" in json_frame:
- symbol = json_frame["symbol"]
- location = int(json_frame["symbolLocation"])
+ if 'symbol' in json_frame:
+ symbol = json_frame['symbol']
+ location = 0
+ if "symbolLocation" in json_frame and json_frame["symbolLocation"]:
+ location = int(json_frame["symbolLocation"])
image = self.images[image_id]
image.symbols[symbol] = {
"name": symbol,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151844.527212.patch
Type: text/x-patch
Size: 857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230531/742097d8/attachment.bin>
More information about the lldb-commits
mailing list