[all-commits] [llvm/llvm-project] f95173: [lldb] Add the ability to silently import scripted...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Fri Jul 9 10:05:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f9517353959b4ef5c706e4356b56aeb9e0087584
https://github.com/llvm/llvm-project/commit/f9517353959b4ef5c706e4356b56aeb9e0087584
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2021-07-09 (Fri, 09 Jul 2021)
Changed paths:
M lldb/include/lldb/Interpreter/ScriptInterpreter.h
M lldb/source/Commands/CommandObjectCommands.cpp
M lldb/source/Commands/Options.td
M lldb/source/Core/Module.cpp
M lldb/source/Interpreter/ScriptInterpreter.cpp
M lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
M lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
M lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h
M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
A lldb/test/Shell/ScriptInterpreter/Python/silent_command_script_import.test
Log Message:
-----------
[lldb] Add the ability to silently import scripted commands
Add the ability to silence command script import. The motivation for
this change is being able to add command script import -s
lldb.macosx.crashlog to your ~/.lldbinit without it printing the
following message at the beginning of every debug session.
"malloc_info", "ptr_refs", "cstr_refs", "find_variable", and
"objc_refs" commands have been installed, use the "--help" options on
these commands for detailed help.
In addition to forwarding the silent option to LoadScriptingModule, this
also changes ScriptInterpreterPythonImpl::ExecuteOneLineWithReturn and
ScriptInterpreterPythonImpl::ExecuteMultipleLines to honor the enable IO
option in ExecuteScriptOptions, which until now was ignored.
Note that IO is only enabled (or disabled) at the start of a session,
and for this particular use case, that's done when taking the Python
lock in LoadScriptingModule, which means that the changes to these two
functions are not strictly necessary, but (IMO) desirable nonetheless.
Differential revision: https://reviews.llvm.org/D105327
More information about the All-commits
mailing list