diff options
author | Greg Clayton <gclayton@apple.com> | 2012-05-17 03:58:23 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-05-17 03:58:23 +0000 |
commit | f67002dd4cec0d362ab7fe41692d7d940618d95e (patch) | |
tree | 97846fdb95c364ef172d8349e3ad68f4db113d2b /lldb/examples/python/crashlog.py | |
parent | b273b743732d609e9d64b5e21fb126648742dc77 (diff) | |
download | llvm-f67002dd4cec0d362ab7fe41692d7d940618d95e.zip llvm-f67002dd4cec0d362ab7fe41692d7d940618d95e.tar.gz llvm-f67002dd4cec0d362ab7fe41692d7d940618d95e.tar.bz2 |
Make sure to subtract one from the PC when doing the symbolication of stack frames when it isn't the zero'th frame.
llvm-svn: 156974
Diffstat (limited to 'lldb/examples/python/crashlog.py')
-rwxr-xr-x | lldb/examples/python/crashlog.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index 3204428..11e532a 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -556,7 +556,12 @@ be disassembled and lookups can be performed using the addresses found in the cr #prev_frame_index = -1 for frame_idx, frame in enumerate(thread.frames): disassemble = (this_thread_crashed or options.disassemble_all_threads) and frame_idx < options.disassemble_depth; - symbolicated_frame_addresses = crash_log.symbolicate (frame.pc) + if frame_idx == 0: + symbolicated_frame_addresses = crash_log.symbolicate (frame.pc) + else: + # Any frame above frame zero and we have to subtract one to get the previous line entry + symbolicated_frame_addresses = crash_log.symbolicate (frame.pc - 1) + if symbolicated_frame_addresses: symbolicated_frame_address_idx = 0 for symbolicated_frame_address in symbolicated_frame_addresses: |