[Lldb-commits] [lldb] r156974 - /lldb/trunk/examples/python/crashlog.py
Greg Clayton
gclayton at apple.com
Wed May 16 20:58:24 PDT 2012
Author: gclayton
Date: Wed May 16 22:58:23 2012
New Revision: 156974
URL: http://llvm.org/viewvc/llvm-project?rev=156974&view=rev
Log:
Make sure to subtract one from the PC when doing the symbolication of stack frames when it isn't the zero'th frame.
Modified:
lldb/trunk/examples/python/crashlog.py
Modified: lldb/trunk/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/crashlog.py?rev=156974&r1=156973&r2=156974&view=diff
==============================================================================
--- lldb/trunk/examples/python/crashlog.py (original)
+++ lldb/trunk/examples/python/crashlog.py Wed May 16 22:58:23 2012
@@ -556,7 +556,12 @@
#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:
More information about the lldb-commits
mailing list