diff options
| author | Enrico Granata <egranata@apple.com> | 2012-03-16 01:25:01 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2012-03-16 01:25:01 +0000 |
| commit | 676d3b06829bb859227586777f4997325e01bbd2 (patch) | |
| tree | 06418d68e14d8a6033d7b5840b4fb44f82ef738c /lldb/examples/customization/import-python | |
| parent | 82d0d5fc6ba73e7abe8fd498e546379c20a2b960 (diff) | |
| download | bcm5719-llvm-676d3b06829bb859227586777f4997325e01bbd2.tar.gz bcm5719-llvm-676d3b06829bb859227586777f4997325e01bbd2.zip | |
Warn about an example script being obsoleted by new native features and just an example
llvm-svn: 152890
Diffstat (limited to 'lldb/examples/customization/import-python')
| -rw-r--r-- | lldb/examples/customization/import-python/README | 9 | ||||
| -rw-r--r-- | lldb/examples/customization/import-python/importcmd.py | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lldb/examples/customization/import-python/README b/lldb/examples/customization/import-python/README index 4d143bd6c8e..9122f8f46dc 100644 --- a/lldb/examples/customization/import-python/README +++ b/lldb/examples/customization/import-python/README @@ -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 command, can be included in the .lldbinit file to make this feature available at 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 diff --git a/lldb/examples/customization/import-python/importcmd.py b/lldb/examples/customization/import-python/importcmd.py index 6a900bd8b15..576a642d5a0 100644 --- a/lldb/examples/customization/import-python/importcmd.py +++ b/lldb/examples/customization/import-python/importcmd.py @@ -16,6 +16,7 @@ def do_import(debugger,modname): def pyimport_cmd(debugger, args, result, dict): """Import a Python module given its full path""" + print 'WARNING: obsolete feature - use native command "command script import"' if args == "": return "no module path given"; if not (os.sep in args): |

