brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · abb445a Raw
53 lines · c
1//===-- InstrumentationRuntimeASanLibsanitizers.h ---------------*- C++ -*-===//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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H10#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H11 12#include "lldb/Target/InstrumentationRuntime.h"13 14class InstrumentationRuntimeASanLibsanitizers15    : public lldb_private::InstrumentationRuntime {16public:17  ~InstrumentationRuntimeASanLibsanitizers() override;18 19  static lldb::InstrumentationRuntimeSP20  CreateInstance(const lldb::ProcessSP &process_sp);21 22  static void Initialize();23 24  static void Terminate();25 26  static llvm::StringRef GetPluginNameStatic() { return "Libsanitizers-ASan"; }27 28  static lldb::InstrumentationRuntimeType GetTypeStatic();29 30  llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }31 32  virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); }33 34private:35  InstrumentationRuntimeASanLibsanitizers(const lldb::ProcessSP &process_sp)36      : lldb_private::InstrumentationRuntime(process_sp) {}37 38  const lldb_private::RegularExpression &GetPatternForRuntimeLibrary() override;39 40  bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;41 42  void Activate() override;43 44  void Deactivate();45 46  static bool47  NotifyBreakpointHit(void *baton,48                      lldb_private::StoppointCallbackContext *context,49                      lldb::user_id_t break_id, lldb::user_id_t break_loc_id);50};51 52#endif // LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H53