Skip to content

Commit

Permalink
[lldb] Fix "NameError: name 'self' is not defined" when using crashlo…
Browse files Browse the repository at this point in the history
…g -c

This fixes a regression introduced by 27f27d1 that results in a
NameError: (name 'self' is not defined) when using crashlog with the -c
option.

rdar://110007391
  • Loading branch information
JDevlieghere committed Jun 6, 2023
1 parent 0874110 commit a10019a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lldb/examples/python/crashlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ def SymbolicateCrashLog(crash_log, options):
for thread in crash_log.threads:
if thread.did_crash():
for ident in thread.idents:
for image in self.crashlog.find_images_with_identifier(ident):
for image in crash_log.find_images_with_identifier(ident):
image.resolve = True

futures = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# RUN: cp %S/Inputs/a.out.ips %t.crash
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash --offsets '{"main":20, "bar":9, "foo":16}' --json
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog %t.crash' 2>&1 | FileCheck %s
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog -c %t.crash' 2>&1 | FileCheck %s

# RUN: cp %S/Inputs/a.out.ips %t.nometadata.crash
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.nometadata.crash --offsets '{"main":20, "bar":9, "foo":16}' --json --no-metadata
Expand Down

0 comments on commit a10019a

Please sign in to comment.