diff options
author | Ted Woodward <ted.woodward@codeaurora.org> | 2016-05-11 22:46:53 +0000 |
---|---|---|
committer | Ted Woodward <ted.woodward@codeaurora.org> | 2016-05-11 22:46:53 +0000 |
commit | 911d57840a06615c17e11657435c75b600bf9a67 (patch) | |
tree | d37fcc9ae29f79d807825b3751d091d238b501aa /lldb/source/Target/StackFrameList.cpp | |
parent | 8c4136b0d86a2bff476153ffdf994ed39a8288df (diff) | |
download | bcm5719-llvm-911d57840a06615c17e11657435c75b600bf9a67.tar.gz bcm5719-llvm-911d57840a06615c17e11657435c75b600bf9a67.zip |
Keep original source path and mapped path in LineEntry
Summary:
The "file" variable in a LineEntry was mapped using target.source-map, except when stepping through inlined code. This patch adds a new variable to LineEntry, "original_file", that contains the original file from the debug info. "file" will continue to (possibly) be mapped.
Some code has been changed to use "original_file". This is code dealing with symbols. Code dealing with source files will still use "file". Reviewers, please confirm that these particular changes are correct.
Tests run on Ubuntu 12.04 show no regression.
Reviewers: clayborg, jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D20135
llvm-svn: 269250
Diffstat (limited to 'lldb/source/Target/StackFrameList.cpp')
-rw-r--r-- | lldb/source/Target/StackFrameList.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp index 3f29c103011..f78337ba7b3 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -350,6 +350,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) if (unwind_block) { Address curr_frame_address (unwind_frame_sp->GetFrameCodeAddress()); + TargetSP target_sp = m_thread.CalculateTarget(); // Be sure to adjust the frame address to match the address // that was used to lookup the symbol context above. If we are // in the first concrete frame, then we lookup using the current @@ -362,9 +363,8 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) // 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(), eAddressClassCode); - curr_frame_address.SetOpcodeLoadAddress(load_addr - 1, target.get(), eAddressClassCode); + addr_t load_addr = curr_frame_address.GetOpcodeLoadAddress(target_sp.get(), eAddressClassCode); + curr_frame_address.SetOpcodeLoadAddress(load_addr - 1, target_sp.get(), eAddressClassCode); } else { @@ -377,17 +377,18 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) while (unwind_sc.GetParentOfInlinedScope(curr_frame_address, next_frame_sc, next_frame_address)) { - StackFrameSP frame_sp(new StackFrame (m_thread.shared_from_this(), - m_frames.size(), - idx, - unwind_frame_sp->GetRegisterContextSP (), - cfa, - next_frame_address, - &next_frame_sc)); - - m_frames.push_back (frame_sp); - unwind_sc = next_frame_sc; - curr_frame_address = next_frame_address; + next_frame_sc.line_entry.ApplyFileMappings(target_sp);
+ StackFrameSP frame_sp(new StackFrame(m_thread.shared_from_this(), + m_frames.size(), + idx, + unwind_frame_sp->GetRegisterContextSP (), + cfa, + next_frame_address, + &next_frame_sc)); + + m_frames.push_back (frame_sp); + unwind_sc = next_frame_sc; + curr_frame_address = next_frame_address; } } } while (m_frames.size() - 1 < end_idx); |