Skip to content

[lldb/interpreter] Add Swift REPL init file support #1745

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

Conversation

medismailben
Copy link

This cherry-picks #1717 to swift/master-next.

Previously, before loading the REPL language-specific init file, lldb
checked the selected target language in which case it returned an unknown
language type with the REPL target.

Instead, the patch calls `Language::GetLanguagesSupportingREPLs` and
look for the first element of that set. In case lldb was not configured
with a REPL language, then, it will just stop sourcing the REPL init
file and fallback to the original logic (continuing with the default
init file).

rdar://65836048

Differential Revision: https://reviews.llvm.org/D87076

Signed-off-by: Med Ismail Bennani <[email protected]>
This test adds `breakpoint set` commands with different source locations
to a temporary `.lldbinit-swift-repl` and `.lldbinit` and after launching
lldb, it checks that the breakpoint set in the debugger matches the
source location from the SwiftREPL initfile.

rdar://65836048

Signed-off-by: Med Ismail Bennani <[email protected]>
@medismailben medismailben merged commit 65b7dcb into swiftlang:swift/master-next Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant