summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2013-04-30 03:03:06 +0000
committerJason Molenda <jmolenda@apple.com>2013-04-30 03:03:06 +0000
commitf7305a610309f353481d44bba0fbc090fbe521c9 (patch)
treeb4ab183953ccc22814d49142ff78a8db6fb5f2a8
parentd00c2765aa6a53e3e15a7f13637c266deffee5a0 (diff)
downloadbcm5719-llvm-f7305a610309f353481d44bba0fbc090fbe521c9.tar.gz
bcm5719-llvm-f7305a610309f353481d44bba0fbc090fbe521c9.zip
Rename unwind_diagnose.py to diagnose_unwind.py. Change
finish-swig-Python-LLDB.sh to create a new lldb.diagnose subdirectory in the LLDB framework; the first diagnostic command in this directory is diagnose-unwind. There may be others added in the future. Users can load these diagnostic tools into their session with "script import lldb.diagnose". llvm-svn: 180768
-rw-r--r--lldb/examples/python/diagnose_unwind.py (renamed from lldb/examples/python/unwind_diagnose.py)14
-rwxr-xr-xlldb/scripts/Python/finish-swig-Python-LLDB.sh7
2 files changed, 12 insertions, 9 deletions
diff --git a/lldb/examples/python/unwind_diagnose.py b/lldb/examples/python/diagnose_unwind.py
index 9a91897ba11..1e182e27eb5 100644
--- a/lldb/examples/python/unwind_diagnose.py
+++ b/lldb/examples/python/diagnose_unwind.py
@@ -1,4 +1,4 @@
-# This implements the "unwind-diagnose" command, usually installed in the debug session like
+# This implements the "diagnose-unwind" command, usually installed in the debug session like
# script import lldb.macosx
# it is used when lldb's backtrace fails -- it collects and prints information about the stack frames,
# and tries an alternate unwind algorithm, that will help to understand why lldb's unwind algorithm did
@@ -83,11 +83,11 @@ def simple_backtrace(debugger):
cur_fp = next_fp
backtrace_print_frame (target, frame_num, cur_pc, cur_fp)
-def unwind_diagnose(debugger, command, result, dict):
+def diagnose_unwind(debugger, command, result, dict):
# Use the Shell Lexer to properly parse up command options just like a
# shell would
command_args = shlex.split(command)
- parser = create_unwind_diagnose_options()
+ parser = create_diagnose_unwind_options()
try:
(options, args) = parser.parse_args(command_args)
except:
@@ -151,11 +151,11 @@ def unwind_diagnose(debugger, command, result, dict):
else:
debugger.HandleCommand('image show-unwind -n "%s"' % frame.GetFunctionName())
-def create_unwind_diagnose_options():
+def create_diagnose_unwind_options():
usage = "usage: %prog"
description='''Print diagnostic information about a thread backtrace which will help to debug unwind problems'''
- parser = optparse.OptionParser(description=description, prog='unwind_diagnose',usage=usage)
+ parser = optparse.OptionParser(description=description, prog='diagnose_unwind',usage=usage)
return parser
-lldb.debugger.HandleCommand('command script add -f %s.unwind_diagnose unwind-diagnose' % __name__)
-print 'The "unwind-diagnose" command has been installed, type "help unwind-diagnose" for detailed help.'
+lldb.debugger.HandleCommand('command script add -f %s.diagnose_unwind diagnose-unwind' % __name__)
+print 'The "diagnose-unwind" command has been installed, type "help diagnose-unwind" for detailed help.'
diff --git a/lldb/scripts/Python/finish-swig-Python-LLDB.sh b/lldb/scripts/Python/finish-swig-Python-LLDB.sh
index c9818f89795..d057ba95e55 100755
--- a/lldb/scripts/Python/finish-swig-Python-LLDB.sh
+++ b/lldb/scripts/Python/finish-swig-Python-LLDB.sh
@@ -244,10 +244,13 @@ if [ ${OS_NAME} = "Darwin" ]
then
# lldb/macosx
package_files="${SRC_ROOT}/examples/python/crashlog.py
- ${SRC_ROOT}/examples/darwin/heap_find/heap.py
- ${SRC_ROOT}/examples/python/unwind_diagnose.py"
+ ${SRC_ROOT}/examples/darwin/heap_find/heap.py"
create_python_package "/macosx" "${package_files}"
+ # lldb/diagnose
+ package_files="${SRC_ROOT}/examples/python/diagnose_unwind.py"
+ create_python_package "/diagnose" "${package_files}"
+
# Copy files needed by lldb/macosx/heap.py to build libheap.dylib
heap_dir="${framework_python_dir}/macosx/heap"
if [ ! -d "${heap_dir}" ]
OpenPOWER on IntegriCloud