1 //===-- ProcessFreeBSDKernel.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-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H 10 #define LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H 11 12 #include "lldb/Target/PostMortemProcess.h" 13 14 class ProcessFreeBSDKernel : public lldb_private::PostMortemProcess { 15 public: 16 ProcessFreeBSDKernel(lldb::TargetSP target_sp, lldb::ListenerSP listener); 17 18 static lldb::ProcessSP 19 CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener, 20 const lldb_private::FileSpec *crash_file_path, 21 bool can_connect); 22 23 static void Initialize(); 24 25 static void Terminate(); 26 27 static llvm::StringRef GetPluginNameStatic() { return "freebsd-kernel"; } 28 29 static llvm::StringRef GetPluginDescriptionStatic() { 30 return "FreeBSD kernel vmcore debugging plug-in."; 31 } 32 33 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); } 34 35 lldb_private::Status DoDestroy() override; 36 37 bool CanDebug(lldb::TargetSP target_sp, 38 bool plugin_specified_by_name) override; 39 40 void RefreshStateAfterStop() override; 41 42 lldb_private::Status DoLoadCore() override; 43 44 lldb_private::DynamicLoader *GetDynamicLoader() override; 45 46 protected: 47 bool DoUpdateThreadList(lldb_private::ThreadList &old_thread_list, 48 lldb_private::ThreadList &new_thread_list) override; 49 50 lldb::addr_t FindSymbol(const char* name); 51 }; 52 53 #endif // LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H 54