Add GetFrameWithStackID to the StackFrameList and the Thread (which routes to its StackFrameList.)

llvm-svn: 128592
This commit is contained in:
Jim Ingham 2011-03-31 00:15:49 +00:00
parent 271efda884
commit 3a195b7e78
4 changed files with 26 additions and 0 deletions

View File

@ -41,6 +41,9 @@ public:
lldb::StackFrameSP
GetFrameWithConcreteFrameIndex (uint32_t unwind_idx);
lldb::StackFrameSP
GetFrameWithStackID (StackID &stack_id);
// Mark a stack frame as the current frame
uint32_t

View File

@ -324,6 +324,9 @@ public:
virtual lldb::StackFrameSP
GetFrameWithConcreteFrameIndex (uint32_t unwind_idx);
virtual lldb::StackFrameSP
GetFrameWithStackID(StackID &stack_id);
uint32_t
GetSelectedFrameIndex ();

View File

@ -356,6 +356,21 @@ StackFrameList::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx)
return frame_sp;
}
StackFrameSP
StackFrameList::GetFrameWithStackID (StackID &stack_id)
{
uint32_t frame_idx = 0;
StackFrameSP frame_sp;
do
{
frame_sp = GetFrameAtIndex (frame_idx);
if (frame_sp && frame_sp->GetStackID() == stack_id)
break;
frame_idx++;
}
while (frame_sp);
return frame_sp;
}
bool
StackFrameList::SetFrameAtIndex (uint32_t idx, StackFrameSP &frame_sp)

View File

@ -950,6 +950,11 @@ Thread::GetFrameWithConcreteFrameIndex (uint32_t unwind_idx)
return GetStackFrameList().GetFrameWithConcreteFrameIndex (unwind_idx);
}
lldb::StackFrameSP
Thread::GetFrameWithStackID(StackID &stack_id)
{
return GetStackFrameList().GetFrameWithStackID (stack_id);
}
lldb::StackFrameSP