[Lldb-commits] [lldb] r238737 - Fix address adjusment in stack frame inline block lookup
Tamas Berghammer
tberghammer at google.com
Mon Jun 1 03:38:23 PDT 2015
Author: tberghammer
Date: Mon Jun 1 05:38:23 2015
New Revision: 238737
URL: http://llvm.org/viewvc/llvm-project?rev=238737&view=rev
Log:
Fix address adjusment in stack frame inline block lookup
When the current address is pointing 1 (unit) over the end of a
section the we have to do a section lookup after making the adjusment
of the current address.
Differential revision: http://reviews.llvm.org/D10124
Modified:
lldb/trunk/source/Target/StackFrameList.cpp
Modified: lldb/trunk/source/Target/StackFrameList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrameList.cpp?rev=238737&r1=238736&r2=238737&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrameList.cpp (original)
+++ lldb/trunk/source/Target/StackFrameList.cpp Mon Jun 1 05:38:23 2015
@@ -355,7 +355,21 @@ StackFrameList::GetFramesUpTo(uint32_t e
// address, else we decrement the address by one to get the correct
// location.
if (idx > 0)
- curr_frame_address.Slide(-1);
+ {
+ if (curr_frame_address.GetOffset() == 0)
+ {
+ // If curr_frame_address points to the first address in a section then after
+ // adjustment it will point to an other section. In that case resolve the
+ // address again to the correct section plus offset form.
+ TargetSP target = m_thread.CalculateTarget();
+ addr_t load_addr = curr_frame_address.GetOpcodeLoadAddress(target.get());
+ curr_frame_address.SetOpcodeLoadAddress(load_addr - 1, target.get());
+ }
+ else
+ {
+ curr_frame_address.Slide(-1);
+ }
+ }
SymbolContext next_frame_sc;
Address next_frame_address;
More information about the lldb-commits
mailing list