xref: /freebsd/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
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:
16*0fca6ea1SDimitry Andric   ProcessFreeBSDKernel(lldb::TargetSP target_sp, lldb::ListenerSP listener,
17*0fca6ea1SDimitry Andric                        const lldb_private::FileSpec &core_file);
180eae32dcSDimitry Andric 
190eae32dcSDimitry Andric   static lldb::ProcessSP
200eae32dcSDimitry Andric   CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener,
210eae32dcSDimitry Andric                  const lldb_private::FileSpec *crash_file_path,
220eae32dcSDimitry Andric                  bool can_connect);
230eae32dcSDimitry Andric 
240eae32dcSDimitry Andric   static void Initialize();
250eae32dcSDimitry Andric 
260eae32dcSDimitry Andric   static void Terminate();
270eae32dcSDimitry Andric 
GetPluginNameStatic()280eae32dcSDimitry Andric   static llvm::StringRef GetPluginNameStatic() { return "freebsd-kernel"; }
290eae32dcSDimitry Andric 
GetPluginDescriptionStatic()300eae32dcSDimitry Andric   static llvm::StringRef GetPluginDescriptionStatic() {
310eae32dcSDimitry Andric     return "FreeBSD kernel vmcore debugging plug-in.";
320eae32dcSDimitry Andric   }
330eae32dcSDimitry Andric 
GetPluginName()340eae32dcSDimitry Andric   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
350eae32dcSDimitry Andric 
360eae32dcSDimitry Andric   lldb_private::Status DoDestroy() override;
370eae32dcSDimitry Andric 
380eae32dcSDimitry Andric   bool CanDebug(lldb::TargetSP target_sp,
390eae32dcSDimitry Andric                 bool plugin_specified_by_name) override;
400eae32dcSDimitry Andric 
410eae32dcSDimitry Andric   void RefreshStateAfterStop() override;
420eae32dcSDimitry Andric 
430eae32dcSDimitry Andric   lldb_private::Status DoLoadCore() override;
440eae32dcSDimitry Andric 
450eae32dcSDimitry Andric   lldb_private::DynamicLoader *GetDynamicLoader() override;
460eae32dcSDimitry Andric 
470eae32dcSDimitry Andric protected:
480eae32dcSDimitry Andric   bool DoUpdateThreadList(lldb_private::ThreadList &old_thread_list,
490eae32dcSDimitry Andric                           lldb_private::ThreadList &new_thread_list) override;
5004eeddc0SDimitry Andric 
5104eeddc0SDimitry Andric   lldb::addr_t FindSymbol(const char* name);
520eae32dcSDimitry Andric };
530eae32dcSDimitry Andric 
540eae32dcSDimitry Andric #endif // LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H
55