[Lldb-commits] [PATCH] D89334: [lldb] Support Python imports relative the to the current file being sourced
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 26 15:16:19 PDT 2020
JDevlieghere updated this revision to Diff 300803.
JDevlieghere added a comment.
Herald added a subscriber: dang.
Briefly discussed this with Pavel on IRC. The latest revision implements what I think you suggested:
- Make the new logic conditional on a new flag (`-c`).
- Add the "command search dir" to the path, not `dirname(path)`.
- Change the test to import a relative module as `baz.hello` instead of `baz/hello`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89334/new/
https://reviews.llvm.org/D89334
Files:
lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/Options.td
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/ScriptInterpreter.cpp
lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
lldb/test/Shell/ScriptInterpreter/Python/Inputs/hello.in
lldb/test/Shell/ScriptInterpreter/Python/Inputs/hello.py
lldb/test/Shell/ScriptInterpreter/Python/Inputs/magritte.in
lldb/test/Shell/ScriptInterpreter/Python/Inputs/magritte.py
lldb/test/Shell/ScriptInterpreter/Python/Inputs/zip.in
lldb/test/Shell/ScriptInterpreter/Python/Inputs/zip.py
lldb/test/Shell/ScriptInterpreter/Python/command_relative_import.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89334.300803.patch
Type: text/x-patch
Size: 20105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201026/0b2160bf/attachment-0001.bin>
More information about the lldb-commits
mailing list