[Lldb-commits] [PATCH] D61921: [Target] Generalize language-specific behavior in ThreadPlanStepThrough

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 14 15:29:01 PDT 2019


xiaobai marked 2 inline comments as done.
xiaobai added inline comments.


================
Comment at: source/Target/ThreadPlanStepThrough.cpp:91
+  if (!m_sub_plan_sp) {
+    for (unsigned lang = eLanguageTypeUnknown;
+         !m_sub_plan_sp && lang < eNumLanguageTypes; lang++) {
----------------
JDevlieghere wrote:
>  Given that we seem to have this pattern in a bunch of places, would it be worth extracting this into some kind of convenience function?
Yeah, I'm getting tired of writing it. We could pull it into Process, into a `ForEachLanguageRuntime` or something. I can either do that before this goes in or in a follow up


================
Comment at: source/Target/ThreadPlanStepThrough.cpp:96
+        m_sub_plan_sp =
+            runtime->GetStepThroughTrampolinePlan(m_thread, m_stop_others);
+      }
----------------
JDevlieghere wrote:
> Should there be a break here?
I put a `!m_sub_plan_sp` in the for loop's condition. If you think it would be more readable to put a break here, I could do that instead.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61921/new/

https://reviews.llvm.org/D61921





More information about the lldb-commits mailing list