LLDB mainline
ScriptedBreakpointOverrideResolver.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
12#include "lldb/Core/Debugger.h"
14#include "llvm/Support/ErrorExtras.h"
15
16namespace lldb_private {
18 Target &target, lldb::BreakpointResolverSP initial_sp) {
20 {}, m_class_name, initial_sp->GetDepth(), m_args_data));
21 if (candidate_sp->OverridesResolver(target, initial_sp))
22 return candidate_sp;
23 return {};
24}
25
27 ScriptInterpreter *interpreter =
28 m_target.GetDebugger().GetScriptInterpreter();
29 if (!interpreter || !interpreter->CheckObjectExists(m_class_name.c_str()))
30 return llvm::createStringErrorV(
31 "class for breakpoint override: \"{0}\" does not exist", m_class_name);
32 return llvm::Error::success();
33}
34} // namespace lldb_private
"lldb/Breakpoint/BreakpointResolverScripted.h" This class sets breakpoints on a given Address.
virtual bool CheckObjectExists(const char *name)
lldb::BreakpointResolverSP CheckForOverride(Target &target, lldb::BreakpointResolverSP initial_sp) override
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::BreakpointResolver > BreakpointResolverSP