Author: Jonas Devlieghere Date: 2023-06-06T15:20:53-07:00 New Revision: a10019a496d420769d7aae94f234ab6cf9fd778d
URL: https://github.com/llvm/llvm-project/commit/a10019a496d420769d7aae94f234ab6cf9fd778d DIFF: https://github.com/llvm/llvm-project/commit/a10019a496d420769d7aae94f234ab6cf9fd778d.diff LOG: [lldb] Fix "NameError: name 'self' is not defined" when using crashlog -c This fixes a regression introduced by 27f27d15f6c9 that results in a NameError: (name 'self' is not defined) when using crashlog with the -c option. rdar://110007391 Added: Modified: lldb/examples/python/crashlog.py lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test Removed: ################################################################################ diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index 36825b077c6a0..ea197e4f13a4a 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -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 = [] diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test index ef440fb772b48..c2e23e82be7f5 100644 --- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test +++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test @@ -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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits