mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-01 16:31:46 +00:00
[lldb] Support Python imports relative the to the current file being sourced
Make it possible to use a relative path in command script import to the location of the file being sourced. This allows the user to put Python scripts next to LLDB command files and importing them without having to specify an absolute path. To enable this behavior pass `-c` to `command script import`. The argument can only be used when sourcing the command from a file. rdar://68310384 Differential revision: https://reviews.llvm.org/D89334
This commit is contained in:
1 parent
d028d2b376
commit
00bb397b0d
13 files changed
+181
-58
No files matched your search
@@ -231,10 +231,10 @@ public:
|
||||
bool RunScriptFormatKeyword(const char *impl_function, ValueObject *value,
|
||||
std::string &output, Status &error) override;
|
||||
|
||||
bool
|
||||
LoadScriptingModule(const char *filename, bool init_session,
|
||||
lldb_private::Status &error,
|
||||
StructuredData::ObjectSP *module_sp = nullptr) override;
|
||||
bool LoadScriptingModule(const char *filename, bool init_session,
|
||||
lldb_private::Status &error,
|
||||
StructuredData::ObjectSP *module_sp = nullptr,
|
||||
FileSpec extra_search_dir = {}) override;
|
||||
|
||||
bool IsReservedWord(const char *word) override;
|
||||
|
||||
|
||||
Reference in new issue
Block a user