[Lldb-commits] [lldb] r152890 - in /lldb/trunk/examples/customization/import-python: README importcmd.py

Enrico Granata egranata at apple.com
Thu Mar 15 18:25:01 PDT 2012

Author: enrico
Date: Thu Mar 15 20:25:01 2012
New Revision: 152890

URL: http://llvm.org/viewvc/llvm-project?rev=152890&view=rev
Warn about an example script being obsoleted by new native features and just an example


Modified: lldb/trunk/examples/customization/import-python/README
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/customization/import-python/README?rev=152890&r1=152889&r2=152890&view=diff
--- lldb/trunk/examples/customization/import-python/README (original)
+++ lldb/trunk/examples/customization/import-python/README Thu Mar 15 20:25:01 2012
@@ -29,3 +29,12 @@
 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

Modified: lldb/trunk/examples/customization/import-python/importcmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/customization/import-python/importcmd.py?rev=152890&r1=152889&r2=152890&view=diff
--- lldb/trunk/examples/customization/import-python/importcmd.py (original)
+++ lldb/trunk/examples/customization/import-python/importcmd.py Thu Mar 15 20:25:01 2012
@@ -16,6 +16,7 @@
 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):

More information about the lldb-commits mailing list