Add GetFrameWithStackID to the StackFrameList and the Thread (which routes to its StackFrameList.)
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128592 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/StackFrameList.cpp b/source/Target/StackFrameList.cpp
index fbdad14..6ad1799 100644
--- a/source/Target/StackFrameList.cpp
+++ b/source/Target/StackFrameList.cpp
@@ -356,6 +356,21 @@
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)