[lldb][import-std-module] Do some basic file checks before trying to import a moduleCurrently when LLDB has enough data in the debug information to import the `std` module,it will just try to impo
[lldb][import-std-module] Do some basic file checks before trying to import a moduleCurrently 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'tavailable anymore, importing the module will generate a confusing diagnostic thatthe module couldn't be built.For the fallback mode (where we retry failed expressions with the loaded module), thiswill cause the second expression to fail with a module built error instead of theactual parsing issue in the user expression.This patch adds checks that ensures that we at least have any source files in the foundinclude paths before we try to import the module. This prevents the module from beingloaded in the situation described above which means we don't emit the bogus 'can'timport module' diagnostic and also don't waste any time retrying the expression in thefallback mode.For the unit tests I did some refactoring as they now require a VFS with the files in itand not just the paths. The Python test just builds a binary with a fake C++ module,then deletes the module before debugging.Fixes rdar://73264458Reviewed By: JDevlieghereDifferential Revision: https://reviews.llvm.org/D95096
show more ...
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdi
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runnerfor d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done```lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.Reviewers: labath, JDevlieghereTags: #lldbDifferential Revision: https://reviews.llvm.org/D71151