[Lldb-commits] [lldb] db94213 - [lldb/crashlog] Fix test failure when creating a target using command options (#91653)

via lldb-commits lldb-commits at lists.llvm.org
Thu May 9 14:13:49 PDT 2024


Author: Med Ismail Bennani
Date: 2024-05-09T14:13:44-07:00
New Revision: db9421381980cdf3d6914f8898a77d3237325019

URL: https://github.com/llvm/llvm-project/commit/db9421381980cdf3d6914f8898a77d3237325019
DIFF: https://github.com/llvm/llvm-project/commit/db9421381980cdf3d6914f8898a77d3237325019.diff

LOG: [lldb/crashlog] Fix test failure when creating a target using command options (#91653)

This should fix the various crashlog test failures on the bots:

```
  lldb-shell :: ScriptInterpreter/Python/Crashlog/app_specific_backtrace_crashlog.test
  lldb-shell :: ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test
  lldb-shell :: ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test
  lldb-shell :: ScriptInterpreter/Python/Crashlog/last_exception_backtrace_crashlog.test
  lldb-shell :: ScriptInterpreter/Python/Crashlog/skipped_status_interactive_crashlog.test
```

When we create a target by using the command option, we don't set it in
the crashlog object which later on cause us to fail loading the images.

rdar://127832961

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>

Added: 
    

Modified: 
    lldb/examples/python/crashlog.py

Removed: 
    


################################################################################
diff  --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index 2919b9c76e68..641b2e64d53b 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -1494,6 +1494,7 @@ def load_crashlog_in_scripted_process(debugger, crashlog_path, options, result):
             raise InteractiveCrashLogException(
                 "couldn't create target provided by the user (%s)" % options.target_path
             )
+        crashlog.target = target
 
     # 2. If the user didn't provide a target, try to create a target using the symbolicator
     if not target or not target.IsValid():


        


More information about the lldb-commits mailing list