xref: /freebsd-src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.h (revision 04eeddc0aa8e0a417a16eaf9d7d095207f4a8623)
10eae32dcSDimitry Andric //===-- ProcessFreeBSDKernel.h ----------------------------------*- C++ -*-===//
20eae32dcSDimitry Andric //
30eae32dcSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40eae32dcSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50eae32dcSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60eae32dcSDimitry Andric //
70eae32dcSDimitry Andric //===----------------------------------------------------------------------===//
80eae32dcSDimitry Andric 
90eae32dcSDimitry Andric #ifndef LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H
100eae32dcSDimitry Andric #define LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H
110eae32dcSDimitry Andric 
120eae32dcSDimitry Andric #include "lldb/Target/PostMortemProcess.h"
130eae32dcSDimitry Andric 
140eae32dcSDimitry Andric class ProcessFreeBSDKernel : public lldb_private::PostMortemProcess {
150eae32dcSDimitry Andric public:
160eae32dcSDimitry Andric   ProcessFreeBSDKernel(lldb::TargetSP target_sp, lldb::ListenerSP listener);
170eae32dcSDimitry Andric 
180eae32dcSDimitry Andric   static lldb::ProcessSP
190eae32dcSDimitry Andric   CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener,
200eae32dcSDimitry Andric                  const lldb_private::FileSpec *crash_file_path,
210eae32dcSDimitry Andric                  bool can_connect);
220eae32dcSDimitry Andric 
230eae32dcSDimitry Andric   static void Initialize();
240eae32dcSDimitry Andric 
250eae32dcSDimitry Andric   static void Terminate();
260eae32dcSDimitry Andric 
270eae32dcSDimitry Andric   static llvm::StringRef GetPluginNameStatic() { return "freebsd-kernel"; }
280eae32dcSDimitry Andric 
290eae32dcSDimitry Andric   static llvm::StringRef GetPluginDescriptionStatic() {
300eae32dcSDimitry Andric     return "FreeBSD kernel vmcore debugging plug-in.";
310eae32dcSDimitry Andric   }
320eae32dcSDimitry Andric 
330eae32dcSDimitry Andric   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
340eae32dcSDimitry Andric 
350eae32dcSDimitry Andric   lldb_private::Status DoDestroy() override;
360eae32dcSDimitry Andric 
370eae32dcSDimitry Andric   bool CanDebug(lldb::TargetSP target_sp,
380eae32dcSDimitry Andric                 bool plugin_specified_by_name) override;
390eae32dcSDimitry Andric 
400eae32dcSDimitry Andric   void RefreshStateAfterStop() override;
410eae32dcSDimitry Andric 
420eae32dcSDimitry Andric   lldb_private::Status DoLoadCore() override;
430eae32dcSDimitry Andric 
440eae32dcSDimitry Andric   lldb_private::DynamicLoader *GetDynamicLoader() override;
450eae32dcSDimitry Andric 
460eae32dcSDimitry Andric protected:
470eae32dcSDimitry Andric   bool DoUpdateThreadList(lldb_private::ThreadList &old_thread_list,
480eae32dcSDimitry Andric                           lldb_private::ThreadList &new_thread_list) override;
49*04eeddc0SDimitry Andric 
50*04eeddc0SDimitry Andric   lldb::addr_t FindSymbol(const char* name);
510eae32dcSDimitry Andric };
520eae32dcSDimitry Andric 
530eae32dcSDimitry Andric #endif // LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H
54