Path: blob/main/contrib/llvm-project/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.h
39644 views
//===-- InstrumentationRuntimeMainThreadChecker.h----------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_MAINTHREADCHECKER_INSTRUMENTATIONRUNTIMEMAINTHREADCHECKER_H9#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_MAINTHREADCHECKER_INSTRUMENTATIONRUNTIMEMAINTHREADCHECKER_H1011#include "lldb/Target/ABI.h"12#include "lldb/Target/InstrumentationRuntime.h"13#include "lldb/Utility/StructuredData.h"14#include "lldb/lldb-private.h"1516namespace lldb_private {1718class InstrumentationRuntimeMainThreadChecker19: public lldb_private::InstrumentationRuntime {20public:21~InstrumentationRuntimeMainThreadChecker() override;2223static lldb::InstrumentationRuntimeSP24CreateInstance(const lldb::ProcessSP &process_sp);2526static void Initialize();2728static void Terminate();2930static llvm::StringRef GetPluginNameStatic() { return "MainThreadChecker"; }3132static lldb::InstrumentationRuntimeType GetTypeStatic();3334llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }3536virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); }3738lldb::ThreadCollectionSP39GetBacktracesFromExtendedStopInfo(StructuredData::ObjectSP info) override;4041private:42InstrumentationRuntimeMainThreadChecker(const lldb::ProcessSP &process_sp)43: lldb_private::InstrumentationRuntime(process_sp) {}4445const RegularExpression &GetPatternForRuntimeLibrary() override;4647bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;4849void Activate() override;5051void Deactivate();5253static bool NotifyBreakpointHit(void *baton,54StoppointCallbackContext *context,55lldb::user_id_t break_id,56lldb::user_id_t break_loc_id);5758StructuredData::ObjectSP RetrieveReportData(ExecutionContextRef exe_ctx_ref);59};6061} // namespace lldb_private6263#endif // LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_MAINTHREADCHECKER_INSTRUMENTATIONRUNTIMEMAINTHREADCHECKER_H646566