aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-02-22 02:21:10 +0000
committerEnrico Granata <egranata@apple.com>2013-02-22 02:21:10 +0000
commit3801be785a607162d3dda0744a7d915bda4c13a3 (patch)
treeb2eb2df4afc24ddcb3ff4c46e5d1496ae5df49bd /examples
parent45fa511aeb31116f73a45d84c1c2d3a2200b2ce7 (diff)
downloadlldb-3801be785a607162d3dda0744a7d915bda4c13a3.tar.gz
Using __package__ and __name__ seems redundant - __name__ should always contain the fully qualified module name
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r--examples/darwin/heap_find/heap.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/examples/darwin/heap_find/heap.py b/examples/darwin/heap_find/heap.py
index c3bf76eec..154bfc842 100644
--- a/examples/darwin/heap_find/heap.py
+++ b/examples/darwin/heap_find/heap.py
@@ -1094,13 +1094,6 @@ int nc = (int)objc_getClassList(baton.classes, sizeof(baton.classes)/sizeof(Clas
if __name__ == '__main__':
lldb.debugger = lldb.SBDebugger.Create()
-# This initializer is being run from LLDB in the embedded command interpreter
-# Add any commands contained in this module to LLDB
-if __package__:
- package_name = __package__ + '.' + __name__
-else:
- package_name = __name__
-
# Make the options so we can generate the help text for the new LLDB
# command line command prior to registering it with LLDB below. This way
# if clients in LLDB type "help malloc_info", they will see the exact same
@@ -1109,13 +1102,13 @@ ptr_refs.__doc__ = get_ptr_refs_options().format_help()
cstr_refs.__doc__ = get_cstr_refs_options().format_help()
malloc_info.__doc__ = get_malloc_info_options().format_help()
objc_refs.__doc__ = get_objc_refs_options().format_help()
-lldb.debugger.HandleCommand('command script add -f %s.ptr_refs ptr_refs' % package_name)
-lldb.debugger.HandleCommand('command script add -f %s.cstr_refs cstr_refs' % package_name)
-lldb.debugger.HandleCommand('command script add -f %s.malloc_info malloc_info' % package_name)
+lldb.debugger.HandleCommand('command script add -f %s.ptr_refs ptr_refs' % __name__)
+lldb.debugger.HandleCommand('command script add -f %s.cstr_refs cstr_refs' % __name__)
+lldb.debugger.HandleCommand('command script add -f %s.malloc_info malloc_info' % __name__)
# lldb.debugger.HandleCommand('command script add -f %s.heap heap' % package_name)
# lldb.debugger.HandleCommand('command script add -f %s.section_ptr_refs section_ptr_refs' % package_name)
# lldb.debugger.HandleCommand('command script add -f %s.stack_ptr_refs stack_ptr_refs' % package_name)
-lldb.debugger.HandleCommand('command script add -f %s.objc_refs objc_refs' % package_name)
+lldb.debugger.HandleCommand('command script add -f %s.objc_refs objc_refs' % __name__)
print '"malloc_info", "ptr_refs", "cstr_refs", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help.'