forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 319
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
[lldb] Various crashlog improvements and bug fixes #8755
Merged
JDevlieghere
merged 5 commits into
apple:swift/release/6.0
from
medismailben:swift/release/6.0
May 23, 2024
Merged
[lldb] Various crashlog improvements and bug fixes #8755
JDevlieghere
merged 5 commits into
apple:swift/release/6.0
from
medismailben:swift/release/6.0
May 23, 2024
+85
−66
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch fixes the various crashlog test failures following ec456ba, which renamed the process member variable in the Scripted Thread python base class. This patch updates the crashlog scripted process implementation to reflect that change. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> (cherry picked from commit 4ec9cda)
In `27f27d1`, we changed the image loading logic to conform to the various options (`-a|--load-all` & `-c|--crashed-only`) and loaded them concurrently. However, instead of the subset of images that matched the user option, the thread pool would always run on all the crashlog images, causing them to be all loaded in the target everytime. This matches the `-a|--load-all` option behaviour but depending on the report, it can cause lldb to load thousands of images, which can take a very long time if the images are downloaded over the network. This patch fixes that issue by keeping a list of `images_to_load` based of the user-provided option. This list will be used with our executor thread pool to load the images according to the user selection, and reinstates the expected default behaviour, by only loading the crashed thread images and skipping all the others. This patch also unifies the way we load images into a single method that's shared by both the batch mode & the interactive scripted process. rdar://123694062 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> (cherry picked from commit 785b143)
… option (llvm#91162) This patch rephrases the crashlog `--no-crashed-only` option help message. This option is mainly used in batch mode to symbolicate and dump all the threads backtraces, instead of only doing it for the crashed thread which is the default behavior. rdar://127391524 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> (cherry picked from commit 8585bf7)
This patch fixes a bug in when resolving and loading modules from the binary image list. When loading a module, we would first use the UUID from the binary image list with `dsymForUUID` to fetch the dSYM bundle from our remote build records and copy the executable locally. If we failed to find a matching dSYM bundle for that UUID on the build record, let's say if that module was built locally, we use Spotlight (`mdfind`) to find the dSYM bundle once again using the UUID. Prior to this patch, we would set the image path to be the same as the symbol file. This resulted in trying to load the dSYM as a module in lldb, which isn't allowed. This patch address that by looking for a binary matching the image identifier, next to the dSYM bundle and try to load that instead. rdar://127433616 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> (cherry picked from commit f4a7e1f)
… 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)
medismailben
force-pushed
the
swift/release/6.0
branch
from
May 14, 2024 16:16
0ea579a
to
e3ec080
Compare
@swift-ci test |
JDevlieghere
approved these changes
May 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses many issues on the lldb crashlog lldb script.