Path: blob/main/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.h
39690 views
//===-- GNUstepObjCRuntime.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_LANGUAGERUNTIME_OBJC_GNUSTEPOBJCRUNTIME_GNUSTEPOBJCRUNTIME_H9#define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_GNUSTEPOBJCRUNTIME_GNUSTEPOBJCRUNTIME_H1011#include "lldb/Target/LanguageRuntime.h"12#include "lldb/lldb-private.h"1314#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"1516#include "llvm/ADT/StringRef.h"17#include "llvm/Support/Error.h"1819#include <optional>2021namespace lldb_private {2223class GNUstepObjCRuntime : public lldb_private::ObjCLanguageRuntime {24public:25~GNUstepObjCRuntime() override;2627//28// PluginManager, PluginInterface and LLVM RTTI implementation29//3031static char ID;3233static void Initialize();3435static void Terminate();3637static lldb_private::LanguageRuntime *38CreateInstance(Process *process, lldb::LanguageType language);3940static llvm::StringRef GetPluginNameStatic() {41return "gnustep-objc-libobjc2";42}4344llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }4546void ModulesDidLoad(const ModuleList &module_list) override;4748bool isA(const void *ClassID) const override {49return ClassID == &ID || ObjCLanguageRuntime::isA(ClassID);50}5152static bool classof(const LanguageRuntime *runtime) {53return runtime->isA(&ID);54}5556//57// LanguageRuntime implementation58//59llvm::Error GetObjectDescription(Stream &str, Value &value,60ExecutionContextScope *exe_scope) override;6162llvm::Error GetObjectDescription(Stream &str, ValueObject &object) override;6364bool CouldHaveDynamicValue(ValueObject &in_value) override;6566bool GetDynamicTypeAndAddress(ValueObject &in_value,67lldb::DynamicValueType use_dynamic,68TypeAndOrName &class_type_or_name,69Address &address,70Value::ValueType &value_type) override;7172TypeAndOrName FixUpDynamicType(const TypeAndOrName &type_and_or_name,73ValueObject &static_value) override;7475lldb::BreakpointResolverSP76CreateExceptionResolver(const lldb::BreakpointSP &bkpt, bool catch_bp,77bool throw_bp) override;7879lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread,80bool stop_others) override;8182//83// ObjCLanguageRuntime implementation84//8586bool IsModuleObjCLibrary(const lldb::ModuleSP &module_sp) override;8788bool ReadObjCLibrary(const lldb::ModuleSP &module_sp) override;8990bool HasReadObjCLibrary() override { return m_objc_module_sp != nullptr; }9192llvm::Expected<std::unique_ptr<UtilityFunction>>93CreateObjectChecker(std::string name, ExecutionContext &exe_ctx) override;9495ObjCRuntimeVersions GetRuntimeVersion() const override {96return ObjCRuntimeVersions::eGNUstep_libobjc2;97}9899void UpdateISAToDescriptorMapIfNeeded() override;100101protected:102// Call CreateInstance instead.103GNUstepObjCRuntime(Process *process);104105lldb::ModuleSP m_objc_module_sp;106};107108} // namespace lldb_private109110#endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_GNUSTEPOBJCRUNTIME_GNUSTEPOBJCRUNTIME_H111112113