aboutsummaryrefslogtreecommitdiffstats
path: root/source/Target/StackFrameList.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
committerEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
commit5e95aa85bb660d45e9905ef1d7180b2678280660 (patch)
tree3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/Target/StackFrameList.cpp
parent12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff)
downloadsrc-5e95aa85bb660d45e9905ef1d7180b2678280660.tar.gz
src-5e95aa85bb660d45e9905ef1d7180b2678280660.zip
Import LLDB as of upstream SVN 241361 (git 612c075f)vendor/lldb/lldb-r241361
Notes
Notes: svn path=/vendor/lldb/dist/; revision=285101 svn path=/vendor/lldb/lldb-r241361/; revision=285102; tag=vendor/lldb/lldb-r241361
Diffstat (limited to 'source/Target/StackFrameList.cpp')
-rw-r--r--source/Target/StackFrameList.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/Target/StackFrameList.cpp b/source/Target/StackFrameList.cpp
index 9a132618288d..05923d70ce42 100644
--- a/source/Target/StackFrameList.cpp
+++ b/source/Target/StackFrameList.cpp
@@ -343,6 +343,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx)
m_frames.push_back (unwind_frame_sp);
}
+ assert(unwind_frame_sp);
SymbolContext unwind_sc = unwind_frame_sp->GetSymbolContext (eSymbolContextBlock | eSymbolContextFunction);
Block *unwind_block = unwind_sc.block;
if (unwind_block)
@@ -354,7 +355,21 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx)
// 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;