forked from OSchip/llvm-project
Warn about an example script being obsoleted by new native features and just an example
llvm-svn: 152890
This commit is contained in:
parent
82d0d5fc6b
commit
676d3b0682
|
@ -29,3 +29,12 @@ Enrico-Granatas-MacBook-Pro:Debug enricogranata$
|
||||||
Of course, the commands to import the importcmd.py module and to define the import
|
Of course, the commands to import the importcmd.py module and to define the import
|
||||||
command, can be included in the .lldbinit file to make this feature available at
|
command, can be included in the .lldbinit file to make this feature available at
|
||||||
debugger startup
|
debugger startup
|
||||||
|
|
||||||
|
WARNING: The import command defined by importcmd.py is now obsolete
|
||||||
|
In TOT LLDB, you can say:
|
||||||
|
(lldb) command script import ../demo.py
|
||||||
|
(lldb) script demo.test_function('hello world')
|
||||||
|
I am a Python function that says hello world
|
||||||
|
(lldb) quit
|
||||||
|
|
||||||
|
using the native "command script import" command, which offers a superset of what the import command provided by importcmd.py does
|
||||||
|
|
|
@ -16,6 +16,7 @@ def do_import(debugger,modname):
|
||||||
|
|
||||||
def pyimport_cmd(debugger, args, result, dict):
|
def pyimport_cmd(debugger, args, result, dict):
|
||||||
"""Import a Python module given its full path"""
|
"""Import a Python module given its full path"""
|
||||||
|
print 'WARNING: obsolete feature - use native command "command script import"'
|
||||||
if args == "":
|
if args == "":
|
||||||
return "no module path given";
|
return "no module path given";
|
||||||
if not (os.sep in args):
|
if not (os.sep in args):
|
||||||
|
|
Loading…
Reference in New Issue