aboutsummaryrefslogtreecommitdiff
path: root/source/Target/StackFrameList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Target/StackFrameList.cpp')
-rw-r--r--source/Target/StackFrameList.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/source/Target/StackFrameList.cpp b/source/Target/StackFrameList.cpp
index 69309dfae7b6..eaac3613c93d 100644
--- a/source/Target/StackFrameList.cpp
+++ b/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;
}