Skip to content

Commit a10019a

Browse files
committed
[lldb] Fix "NameError: name 'self' is not defined" when using crashlog -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
1 parent 0874110 commit a10019a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lldb/examples/python/crashlog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def SymbolicateCrashLog(crash_log, options):
13071307
for thread in crash_log.threads:
13081308
if thread.did_crash():
13091309
for ident in thread.idents:
1310-
for image in self.crashlog.find_images_with_identifier(ident):
1310+
for image in crash_log.find_images_with_identifier(ident):
13111311
image.resolve = True
13121312

13131313
futures = []

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test

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

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

0 commit comments

Comments
 (0)