[Lldb-commits] [lldb] r180826 - Put a try/catch block around the SBAddress setting; don't want to
Jason Molenda
jmolenda at apple.com
Tue Apr 30 16:03:56 PDT 2013
Author: jmolenda
Date: Tue Apr 30 18:03:56 2013
New Revision: 180826
URL: http://llvm.org/viewvc/llvm-project?rev=180826&view=rev
Log:
Put a try/catch block around the SBAddress setting; don't want to
terminate the command early if we happen to have an invalid load
address.
Modified:
lldb/trunk/examples/python/diagnose_unwind.py
Modified: lldb/trunk/examples/python/diagnose_unwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/diagnose_unwind.py?rev=180826&r1=180825&r2=180826&view=diff
==============================================================================
--- lldb/trunk/examples/python/diagnose_unwind.py (original)
+++ lldb/trunk/examples/python/diagnose_unwind.py Tue Apr 30 18:03:56 2013
@@ -17,19 +17,22 @@ def backtrace_print_frame (target, frame
addr = addr - 1
sbaddr = lldb.SBAddress()
- sbaddr.SetLoadAddress(addr, target)
- module_description = ""
- if sbaddr.GetModule():
- module_filename = ""
- module_uuid_str = sbaddr.GetModule().GetUUIDString()
- if module_uuid_str == None:
- module_uuid_str = ""
- if sbaddr.GetModule().GetFileSpec():
- module_filename = sbaddr.GetModule().GetFileSpec().GetFilename()
- if module_filename == None:
- module_filename = ""
- if module_uuid_str != "" or module_filename != "":
- module_description = '%s %s' % (module_filename, module_uuid_str)
+ try:
+ sbaddr.SetLoadAddress(addr, target)
+ module_description = ""
+ if sbaddr.GetModule():
+ module_filename = ""
+ module_uuid_str = sbaddr.GetModule().GetUUIDString()
+ if module_uuid_str == None:
+ module_uuid_str = ""
+ if sbaddr.GetModule().GetFileSpec():
+ module_filename = sbaddr.GetModule().GetFileSpec().GetFilename()
+ if module_filename == None:
+ module_filename = ""
+ if module_uuid_str != "" or module_filename != "":
+ module_description = '%s %s' % (module_filename, module_uuid_str)
+ except Exception:
+ return
addr_width = process.GetAddressByteSize() * 2
sym_ctx = target.ResolveSymbolContextForAddress(sbaddr, lldb.eSymbolContextEverything)
More information about the lldb-commits
mailing list