Fixed another issue with the inline stack frames where if the first frame
has inlined functions that all started at the same address, then the inlined
backtrace would not produce correct stack frames.
Also cleaned up and inlined a lot of stuff in lldb_private::Address.
Added a function to StackFrame to detect if the frame is a concrete frame so
we can detect the difference between actual frames and inlined frames.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111989 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index 3ab789f..1f70ada 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -926,11 +926,13 @@
Block *parent_block = m_inlined_frame_info[idx].block->GetParent();
parent_block->CalculateSymbolContext(&inline_sc);
}
+
+ Address previous_frame_lookup_addr (previous_frame_sp->GetFrameCodeAddress());
+ if (previous_frame_sp->IsConcrete () && previous_frame_sp->GetFrameIndex() > 0)
+ previous_frame_lookup_addr.Slide (-1);
- Address backed_up_pc (previous_frame_sp->GetFrameCodeAddress());
- backed_up_pc.SetOffset(backed_up_pc.GetOffset()-1);
AddressRange range;
- m_inlined_frame_info[idx].block->GetRangeContainingAddress (backed_up_pc, range);
+ m_inlined_frame_info[idx].block->GetRangeContainingAddress (previous_frame_lookup_addr, range);
const InlineFunctionInfo* inline_info = m_inlined_frame_info[idx].block->InlinedFunctionInfo();
assert (inline_info);