23 bool update_module_list)
25 m_language_runtime(nullptr), m_filter_sp() {
26 if (update_module_list)
62 refreash_filter =
true;
68 refreash_filter =
true;
107 m_language(language), m_catch_bp(catch_bp), m_throw_bp(throw_bp) {}
115 if (SetActualResolver())
116 return m_actual_resolver_sp->SearchCallback(filter, context, addr);
118 return eCallbackReturnStop;
122 if (SetActualResolver())
123 return m_actual_resolver_sp->GetDepth();
138 if (m_actual_resolver_sp) {
140 m_actual_resolver_sp->GetDescription(s);
142 s->
Printf(
" the correct runtime exception handler will be determined "
158 ret_sp->SetBreakpoint(breakpoint);
165 ProcessSP process_sp = breakpoint_sp->GetTarget().GetProcessSP();
167 bool refreash_resolver = !m_actual_resolver_sp;
168 if (m_language_runtime ==
nullptr) {
169 m_language_runtime = process_sp->GetLanguageRuntime(m_language);
170 refreash_resolver =
true;
173 process_sp->GetLanguageRuntime(m_language);
174 if (m_language_runtime != language_runtime) {
175 m_language_runtime = language_runtime;
176 refreash_resolver =
true;
180 if (refreash_resolver && m_language_runtime) {
182 breakpoint_sp, m_catch_bp, m_throw_bp);
185 m_actual_resolver_sp.reset();
186 m_language_runtime =
nullptr;
189 m_actual_resolver_sp.reset();
190 m_language_runtime =
nullptr;
192 return (
bool)m_actual_resolver_sp;
205 for (uint32_t idx = 0;
222 for (uint32_t idx = 0;
227 if (
auto precondition_callback =
231 precondition_callback(language, throw_bp))
245 bool hardware =
false;
246 bool resolve_indirect_functions =
false;
249 resolve_indirect_functions));
250 if (exc_breakpt_sp) {
252 exc_breakpt_sp->SetPrecondition(precond);
255 exc_breakpt_sp->SetBreakpointKind(
"exception");
258 return exc_breakpt_sp;
263 bool &behaves_like_zeroth_frame) {
265 if (!process_sp.get())
267 if (process_sp->GetDisableLangRuntimeUnwindPlans() ==
true)
270 if (
LanguageRuntime *runtime = process_sp->GetLanguageRuntime(lang_type)) {
272 process_sp, regctx, behaves_like_zeroth_frame);
294 for (uint32_t idx = 0;
308 parent->
LoadSubCommand(command->GetCommandName().str().c_str(), command);
static llvm::raw_ostream & error(Stream &strm)
static bool classof(const BreakpointResolver *V)
void GetDescription(Stream *s) override
Prints a canonical description for the breakpoint to the stream s.
static bool classof(const BreakpointResolverName *)
Methods for support type inquiry through isa, cast, and dyn_cast:
lldb::BreakpointResolverSP m_actual_resolver_sp
ExceptionBreakpointResolver(lldb::LanguageType language, bool catch_bp, bool throw_bp)
lldb::SearchDepth GetDepth() override
BreakpointResolverSP CopyForBreakpoint(BreakpointSP &breakpoint) override
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
lldb::LanguageType m_language
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
~ExceptionBreakpointResolver() override=default
A section + offset based address class.
"lldb/Breakpoint/BreakpointResolverName.h" This class sets breakpoints on a given function name,...
General Outline: The BreakpointResolver is a Searcher.
unsigned getResolverID() const
getResolverID - Return an ID for the concrete type of this object.
virtual bool IsMultiwordObject()
CommandInterpreter & GetCommandInterpreter()
virtual bool LoadSubCommand(llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj)
static SearchFilter * CreateFromStructuredData(Target &target, const StructuredData::Dictionary &data_dict, Status &error)
void UpdateModuleListIfNeeded()
bool ModulePasses(const lldb::ModuleSP &module_sp) override
Call this method with a Module to see if that module passes the filter.
lldb::SearchFilterSP DoCreateCopy() override
ExceptionSearchFilter(const lldb::TargetSP &target_sp, lldb::LanguageType language, bool update_module_list=true)
void Search(Searcher &searcher) override
Call this method to do the search using the Searcher.
lldb::SearchFilterSP m_filter_sp
lldb::LanguageType m_language
StructuredData::ObjectSP SerializeToStructuredData() override
void GetDescription(Stream *s) override
Prints a canonical description for the search filter to the stream s.
LanguageRuntime * m_language_runtime
virtual StructuredData::ObjectSP GetLanguageSpecificData(SymbolContext sc)
Language runtime plugins can use this API to report language-specific runtime information about this ...
LanguageRuntime(Process *process)
static LanguageRuntime * FindPlugin(Process *process, lldb::LanguageType language)
static lldb::UnwindPlanSP GetRuntimeUnwindPlan(lldb_private::Thread &thread, lldb_private::RegisterContext *regctx, bool &behaves_like_zeroth_frame)
A language runtime may be able to provide a special UnwindPlan for the frame represented by the regis...
static lldb::BreakpointSP CreateExceptionBreakpoint(Target &target, lldb::LanguageType language, bool catch_bp, bool throw_bp, bool is_internal=false)
static void InitializeCommands(CommandObject *parent)
virtual lldb::SearchFilterSP CreateExceptionSearchFilter()
virtual lldb::BreakpointResolverSP CreateExceptionResolver(const lldb::BreakpointSP &bkpt, bool catch_bp, bool throw_bp)=0
static lldb::BreakpointPreconditionSP GetExceptionPrecondition(lldb::LanguageType language, bool throw_bp)
static Language * FindPlugin(lldb::LanguageType language)
static void GetDefaultExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
virtual void GetExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
static std::set< lldb::LanguageType > GetSupportedLanguages()
static LanguageRuntimeCreateInstance GetLanguageRuntimeCreateCallbackAtIndex(uint32_t idx)
static LanguageRuntimeGetCommandObject GetLanguageRuntimeGetCommandObjectAtIndex(uint32_t idx)
static LanguageRuntimeGetExceptionPrecondition GetLanguageRuntimeGetExceptionPreconditionAtIndex(uint32_t idx)
A plug-in interface definition class for debugging a process.
General Outline: Provides the callback and search depth for the SearchFilter search.
lldb::TargetSP m_target_sp
General Outline: Provides the callback and search depth for the SearchFilter search.
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
std::shared_ptr< Object > ObjectSP
Defines a symbol context baton that can be handed other debug core functions.
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
lldb::ProcessSP GetProcess() const
A class that represents a running process on the host machine.
lldb::CommandObjectSP(* LanguageRuntimeGetCommandObject)(CommandInterpreter &interpreter)
std::shared_ptr< lldb_private::SearchFilter > SearchFilterSP
std::shared_ptr< lldb_private::BreakpointResolver > BreakpointResolverSP
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::BreakpointPrecondition > BreakpointPreconditionSP
std::shared_ptr< lldb_private::UnwindPlan > UnwindPlanSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::Module > ModuleSP