Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2024

Conversation

medismailben
Copy link
Member

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

… options

This should fix the various crashlog test failures.

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@bennani.ma>
@medismailben medismailben requested a review from bulbazord May 9, 2024 20:55
@medismailben medismailben requested a review from JDevlieghere as a code owner May 9, 2024 20:55
@llvmbot llvmbot added the lldb label May 9, 2024
@llvmbot
Copy link
Member

llvmbot commented May 9, 2024

@llvm/pr-subscribers-lldb

Author: Med Ismail Bennani (medismailben)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/91653.diff

1 Files Affected:

  • (modified) lldb/examples/python/crashlog.py (+1)
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index 2919b9c76e68b..641b2e64d53b1 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():

@medismailben medismailben merged commit db94213 into llvm:main May 9, 2024
medismailben added a commit to medismailben/llvm-project that referenced this pull request May 14, 2024
… options (llvm#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@bennani.ma>
(cherry picked from commit db94213)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants