
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
11 lines
280 B
Plaintext
11 lines
280 B
Plaintext
#--- hello.in
|
|
command script import -c baz.hello
|
|
#--- hello.py
|
|
import lldb
|
|
|
|
def hello(debugger, command, result, internal_dict):
|
|
print("Hello, World!")
|
|
|
|
def __lldb_init_module(debugger, internal_dict):
|
|
debugger.HandleCommand('command script add -f baz.hello.hello hello')
|