[all-commits] [llvm/llvm-project] 127faa: [lldb] Add -l/--language option to script command
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Tue Sep 15 09:40:37 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 127faae7529aee7e8508abebbc19212ce30bbf27
https://github.com/llvm/llvm-project/commit/127faae7529aee7e8508abebbc19212ce30bbf27
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2020-09-15 (Tue, 15 Sep 2020)
Changed paths:
M lldb/source/Commands/CommandObjectScript.cpp
M lldb/source/Commands/CommandObjectScript.h
M lldb/source/Commands/Options.td
A lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test
M lldb/test/Shell/ScriptInterpreter/Lua/lua.test
A lldb/test/Shell/ScriptInterpreter/Python/python.test
M llvm/lib/Support/MemoryBuffer.cpp
Log Message:
-----------
[lldb] Add -l/--language option to script command
Make it possible to run the script command with a different language
than currently selected.
$ ./bin/lldb -l python
(lldb) script -l lua
>>> io.stdout:write("Hello, World!\n")
Hello, World!
When passing the language option and a raw command, you need to separate
the flag from the script code with --.
$ ./bin/lldb -l python
(lldb) script -l lua -- io.stdout:write("Hello, World!\n")
Hello, World!
Differential revision: https://reviews.llvm.org/D86996
More information about the All-commits
mailing list