diff options
| author | Jason Molenda <jmolenda@apple.com> | 2013-05-01 01:26:52 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2013-05-01 01:26:52 +0000 |
| commit | 64dd73e5e12fa2585e22fc4d75301a2a6c833c63 (patch) | |
| tree | 92a572374d4c89ce07ef5445bd378641516f94aa /lldb/examples/python | |
| parent | d11584a7f7cbd4402d870af1fd6e2f38f55e4898 (diff) | |
| download | bcm5719-llvm-64dd73e5e12fa2585e22fc4d75301a2a6c833c63.tar.gz bcm5719-llvm-64dd73e5e12fa2585e22fc4d75301a2a6c833c63.zip | |
Print a backtrace line for a pc value even if we can't make an SBAddress
out of it.
llvm-svn: 180835
Diffstat (limited to 'lldb/examples/python')
| -rw-r--r-- | lldb/examples/python/diagnose_unwind.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/examples/python/diagnose_unwind.py b/lldb/examples/python/diagnose_unwind.py index 4dc20a58a5b..379fab93fc8 100644 --- a/lldb/examples/python/diagnose_unwind.py +++ b/lldb/examples/python/diagnose_unwind.py @@ -13,6 +13,7 @@ import shlex def backtrace_print_frame (target, frame_num, addr, fp): process = target.GetProcess() addr_for_printing = addr + addr_width = process.GetAddressByteSize() * 2 if frame_num > 0: addr = addr - 1 @@ -32,9 +33,9 @@ def backtrace_print_frame (target, frame_num, addr, fp): if module_uuid_str != "" or module_filename != "": module_description = '%s %s' % (module_filename, module_uuid_str) except Exception: + print '%2d: pc==0x%-*x fp==0x%-*x' % (frame_num, addr_width, addr_for_printing, addr_width, fp) return - addr_width = process.GetAddressByteSize() * 2 sym_ctx = target.ResolveSymbolContextForAddress(sbaddr, lldb.eSymbolContextEverything) if sym_ctx.IsValid() and sym_ctx.GetSymbol().IsValid(): function_start = sym_ctx.GetSymbol().GetStartAddress().GetLoadAddress(target) |

