Warn about an example script being obsoleted by new native features and just an example

llvm-svn: 152890
This commit is contained in:
Enrico Granata 2012-03-16 01:25:01 +00:00
parent 82d0d5fc6b
commit 676d3b0682
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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):