Path: blob/main/contrib/llvm-project/lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.h
39653 views
//===-- InstrumentationRuntimeUBSan.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_UBSAN_INSTRUMENTATIONRUNTIMEUBSAN_H9#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_UBSAN_INSTRUMENTATIONRUNTIMEUBSAN_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 InstrumentationRuntimeUBSan19: public lldb_private::InstrumentationRuntime {20public:21~InstrumentationRuntimeUBSan() override;2223static lldb::InstrumentationRuntimeSP24CreateInstance(const lldb::ProcessSP &process_sp);2526static void Initialize();2728static void Terminate();2930static llvm::StringRef GetPluginNameStatic() {31return "UndefinedBehaviorSanitizer";32}3334static lldb::InstrumentationRuntimeType GetTypeStatic();3536llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }3738virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); }3940lldb::ThreadCollectionSP41GetBacktracesFromExtendedStopInfo(StructuredData::ObjectSP info) override;4243private:44InstrumentationRuntimeUBSan(const lldb::ProcessSP &process_sp)45: lldb_private::InstrumentationRuntime(process_sp) {}4647const RegularExpression &GetPatternForRuntimeLibrary() override;4849bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;5051void Activate() override;5253void Deactivate();5455static bool NotifyBreakpointHit(void *baton,56StoppointCallbackContext *context,57lldb::user_id_t break_id,58lldb::user_id_t break_loc_id);5960StructuredData::ObjectSP RetrieveReportData(ExecutionContextRef exe_ctx_ref);61};6263} // namespace lldb_private6465#endif // LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_UBSAN_INSTRUMENTATIONRUNTIMEUBSAN_H666768