Skip to content

[pull] swiftwasm from swift/main #1088

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 8 commits into from
Jan 24, 2021
Merged

[pull] swiftwasm from swift/main #1088

merged 8 commits into from
Jan 24, 2021

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 24, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Teemperor and others added 8 commits January 22, 2021 01:25
…import a module

Currently when LLDB has enough data in the debug information to import the `std` module,
it will just try to import it. However when debugging libraries where the sources aren't
available anymore, importing the module will generate a confusing diagnostic that
the module couldn't be built.

For the fallback mode (where we retry failed expressions with the loaded module), this
will cause the second expression to fail with a module built error instead of the
actual parsing issue in the user expression.

This patch adds checks that ensures that we at least have any source files in the found
include paths before we try to import the module. This prevents the module from being
loaded in the situation described above which means we don't emit the bogus 'can't
import module' diagnostic and also don't waste any time retrying the expression in the
fallback mode.

For the unit tests I did some refactoring as they now require a VFS with the files in it
and not just the paths. The Python test just builds a binary with a fake C++ module,
then deletes the module before debugging.

Fixes rdar://73264458

Reviewed By: JDevlieghere

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

(cherry picked from commit 99b7b41)
[lldb][import-std-module] Do some basic file checks before trying to …
901966c updated the test but the backport
commit was missing some changes to make the patch compile.
[lldb] Fix compilation of CppModuleConfigurationTest
901966c updated the test but the backport
commit was missing some changes to make the patch compile.
@pull pull bot merged commit c7cab49 into swiftwasm Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants