summaryrefslogtreecommitdiff
path: root/source/Target/ThreadPlanStepThrough.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Target/ThreadPlanStepThrough.cpp')
-rw-r--r--source/Target/ThreadPlanStepThrough.cpp35
1 files changed, 13 insertions, 22 deletions
diff --git a/source/Target/ThreadPlanStepThrough.cpp b/source/Target/ThreadPlanStepThrough.cpp
index d1f3c2219f6d..e46eba00184e 100644
--- a/source/Target/ThreadPlanStepThrough.cpp
+++ b/source/Target/ThreadPlanStepThrough.cpp
@@ -1,17 +1,15 @@
//===-- ThreadPlanStepThrough.cpp -------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "lldb/Target/ThreadPlanStepThrough.h"
#include "lldb/Breakpoint/Breakpoint.h"
-#include "lldb/Target/CPPLanguageRuntime.h"
#include "lldb/Target/DynamicLoader.h"
-#include "lldb/Target/ObjCLanguageRuntime.h"
+#include "lldb/Target/LanguageRuntime.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/Target.h"
@@ -21,12 +19,10 @@
using namespace lldb;
using namespace lldb_private;
-//----------------------------------------------------------------------
// ThreadPlanStepThrough: If the current instruction is a trampoline, step
// through it If it is the beginning of the prologue of a function, step
// through that as well.
// FIXME: At present only handles DYLD trampolines.
-//----------------------------------------------------------------------
ThreadPlanStepThrough::ThreadPlanStepThrough(Thread &thread,
StackID &m_stack_id,
@@ -88,22 +84,17 @@ void ThreadPlanStepThrough::LookForPlanToStepThroughFromCurrentPC() {
m_sub_plan_sp =
loader->GetStepThroughTrampolinePlan(m_thread, m_stop_others);
- // If that didn't come up with anything, try the ObjC runtime plugin:
- if (!m_sub_plan_sp.get()) {
- ObjCLanguageRuntime *objc_runtime =
- m_thread.GetProcess()->GetObjCLanguageRuntime();
- if (objc_runtime)
+ // If the DynamicLoader was unable to provide us with a ThreadPlan, then we
+ // try the LanguageRuntimes.
+ if (!m_sub_plan_sp) {
+ for (LanguageRuntime *runtime :
+ m_thread.GetProcess()->GetLanguageRuntimes()) {
m_sub_plan_sp =
- objc_runtime->GetStepThroughTrampolinePlan(m_thread, m_stop_others);
+ runtime->GetStepThroughTrampolinePlan(m_thread, m_stop_others);
- CPPLanguageRuntime *cpp_runtime =
- m_thread.GetProcess()->GetCPPLanguageRuntime();
-
- // If the ObjC runtime did not provide us with a step though plan then if we
- // have it check the C++ runtime for a step though plan.
- if (!m_sub_plan_sp.get() && cpp_runtime)
- m_sub_plan_sp =
- cpp_runtime->GetStepThroughTrampolinePlan(m_thread, m_stop_others);
+ if (m_sub_plan_sp)
+ break;
+ }
}
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));