summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-11-12 17:25:33 +0000
committeremaste <emaste@FreeBSD.org>2013-11-12 17:25:33 +0000
commit9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e (patch)
treeb9aa1d1064fb25a0f2313d9a7964c862c0b7b354 /contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp
parent4372cfee12af5dfa890561beb0fecc90957ba058 (diff)
parentc727fe695d28799acb499e9961f11ec07d4f9fe2 (diff)
downloadFreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.zip
FreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.tar.gz
Update LLDB to upstream r194122 snapshot
ludes minor changes relative to upstream, for compatibility with FreeBSD's in-tree LLVM 3.3: - Reverted LLDB r191806, restoring use of previous API. - Reverted part of LLDB r189317, restoring previous enum names. - Work around missing LLVM r192504, using previous registerEHFrames API (limited functionality). - Removed PlatformWindows header include and init/terminate calls. Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp b/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp
index 69309df..eaac361 100644
--- a/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp
+++ b/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp
@@ -336,7 +336,10 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx)
SetAllFramesFetched();
break;
}
- unwind_frame_sp.reset (new StackFrame (m_thread.shared_from_this(), m_frames.size(), idx, cfa, pc, NULL));
+ const bool cfa_is_valid = true;
+ const bool stop_id_is_valid = false;
+ const bool is_history_frame = false;
+ unwind_frame_sp.reset (new StackFrame (m_thread.shared_from_this(), m_frames.size(), idx, cfa, cfa_is_valid, pc, 0, stop_id_is_valid, is_history_frame, NULL));
m_frames.push_back (unwind_frame_sp);
}
@@ -534,7 +537,10 @@ StackFrameList::GetFrameAtIndex (uint32_t idx)
addr_t pc, cfa;
if (unwinder->GetFrameInfoAtIndex(idx, cfa, pc))
{
- frame_sp.reset (new StackFrame (m_thread.shared_from_this(), idx, idx, cfa, pc, NULL));
+ const bool cfa_is_valid = true;
+ const bool stop_id_is_valid = false;
+ const bool is_history_frame = false;
+ frame_sp.reset (new StackFrame (m_thread.shared_from_this(), idx, idx, cfa, cfa_is_valid, pc, 0, stop_id_is_valid, is_history_frame, NULL));
Function *function = frame_sp->GetSymbolContext (eSymbolContextFunction).function;
if (function)
@@ -863,7 +869,8 @@ StackFrameList::GetStatus (Stream& strm,
uint32_t first_frame,
uint32_t num_frames,
bool show_frame_info,
- uint32_t num_frames_with_source)
+ uint32_t num_frames_with_source,
+ const char *selected_frame_marker)
{
size_t num_frames_displayed = 0;
@@ -880,15 +887,34 @@ StackFrameList::GetStatus (Stream& strm,
else
last_frame = first_frame + num_frames;
+ StackFrameSP selected_frame_sp = m_thread.GetSelectedFrame();
+ const char *unselected_marker = NULL;
+ std::string buffer;
+ if (selected_frame_marker)
+ {
+ size_t len = strlen(selected_frame_marker);
+ buffer.insert(buffer.begin(), len, ' ');
+ unselected_marker = buffer.c_str();
+ }
+ const char *marker = NULL;
+
for (frame_idx = first_frame; frame_idx < last_frame; ++frame_idx)
{
frame_sp = GetFrameAtIndex(frame_idx);
if (frame_sp.get() == NULL)
break;
+ if (selected_frame_marker != NULL)
+ {
+ if (frame_sp == selected_frame_sp)
+ marker = selected_frame_marker;
+ else
+ marker = unselected_marker;
+ }
+
if (!frame_sp->GetStatus (strm,
show_frame_info,
- num_frames_with_source > (first_frame - frame_idx)))
+ num_frames_with_source > (first_frame - frame_idx), marker))
break;
++num_frames_displayed;
}
OpenPOWER on IntegriCloud