Skip to content

Commit

Permalink
[lldb] Remove unused imports from crashlog.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JDevlieghere committed May 14, 2022
1 parent 9cf17ac commit 447c920
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lldb/examples/python/crashlog.py
Expand Up @@ -26,11 +26,9 @@
# PYTHONPATH=/path/to/LLDB.framework/Resources/Python ./crashlog.py ~/Library/Logs/DiagnosticReports/a.crash
#----------------------------------------------------------------------

import cmd
import concurrent.futures
import contextlib
import datetime
import glob
import json
import optparse
import os
Expand Down Expand Up @@ -526,10 +524,10 @@ def parse_frames(self, thread, json_frames):
thread.frames.append(self.crashlog.Frame(idx, pc, frame_offset))

# on arm64 systems, if it jump through a null function pointer,
# we end up at address 0 and the crash reporter unwinder
# misses the frame that actually faulted.
# But $lr can tell us where the last BL/BLR instruction used
# was at, so insert that address as the caller stack frame.
# we end up at address 0 and the crash reporter unwinder
# misses the frame that actually faulted.
# But $lr can tell us where the last BL/BLR instruction used
# was at, so insert that address as the caller stack frame.
if idx == 0 and pc == 0 and "lr" in thread.registers:
pc = thread.registers["lr"]
for image in self.data['usedImages']:
Expand Down

0 comments on commit 447c920

Please sign in to comment.