Skip to content

Commit fb8cc18

Browse files
Merge pull request #6958 from medismailben/swift/release/5.9
[lldb/crashlog] Fix crash when loading non-symbolicated report
2 parents 813b7ba + cbf779f commit fb8cc18

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lldb/examples/python/crashlog.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,11 @@ def parse_frames(self, thread, json_frames):
545545
image_addr = self.get_used_image(image_id)['base']
546546
pc = image_addr + frame_offset
547547

548-
if 'symbol' in json_frame:
549-
symbol = json_frame['symbol']
550-
location = int(json_frame['symbolLocation'])
548+
if "symbol" in json_frame:
549+
symbol = json_frame["symbol"]
550+
location = 0
551+
if "symbolLocation" in json_frame and json_frame["symbolLocation"]:
552+
location = int(json_frame["symbolLocation"])
551553
image = self.images[image_id]
552554
image.symbols[symbol] = {
553555
"name": symbol,

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.ips

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
"sourceFile": "thread",
280280
"sourceLine": 298,
281281
"symbol": "void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(int&), std::__1::reference_wrapper<int> > >(void*)",
282-
"symbolLocation": 84
282+
"symbolLocation": null
283283
},
284284
{
285285
"imageIndex": 1,

0 commit comments

Comments
 (0)