LLDB  mainline
ProcessFreeBSDKernel.h
Go to the documentation of this file.
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 
13 
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 
36 
37  bool CanDebug(lldb::TargetSP target_sp,
38  bool plugin_specified_by_name) override;
39 
40  void RefreshStateAfterStop() override;
41 
43 
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
ProcessFreeBSDKernel::CreateInstance
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener, const lldb_private::FileSpec *crash_file_path, bool can_connect)
Definition: ProcessFreeBSDKernel.cpp:73
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
ProcessFreeBSDKernel::DoUpdateThreadList
bool DoUpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list) override
Update the thread list following process plug-in's specific logic.
Definition: ProcessFreeBSDKernel.cpp:122
ProcessFreeBSDKernel::Initialize
static void Initialize()
Definition: ProcessFreeBSDKernel.cpp:100
lldb_private::FileSpec
Definition: FileSpec.h:56
ProcessFreeBSDKernel::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic()
Definition: ProcessFreeBSDKernel.h:29
ProcessFreeBSDKernel::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition: ProcessFreeBSDKernel.h:27
lldb_private::ThreadList
Definition: ThreadList.h:26
lldb_private::PostMortemProcess
Definition: PostMortemProcess.h:23
ProcessFreeBSDKernel::GetPluginName
llvm::StringRef GetPluginName() override
Definition: ProcessFreeBSDKernel.h:33
lldb_private::DynamicLoader
Definition: DynamicLoader.h:52
ProcessFreeBSDKernel::RefreshStateAfterStop
void RefreshStateAfterStop() override
Currently called as part of ShouldStop.
Definition: ProcessFreeBSDKernel.cpp:120
PostMortemProcess.h
lldb_private::Status
Definition: Status.h:44
ProcessFreeBSDKernel::DoLoadCore
lldb_private::Status DoLoadCore() override
Definition: ProcessFreeBSDKernel.cpp:257
ProcessFreeBSDKernel::ProcessFreeBSDKernel
ProcessFreeBSDKernel(lldb::TargetSP target_sp, lldb::ListenerSP listener)
Definition: ProcessFreeBSDKernel.cpp:69
ProcessFreeBSDKernel::CanDebug
bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override
Check if a plug-in instance can debug the file in module.
Definition: ProcessFreeBSDKernel.cpp:115
ProcessFreeBSDKernel::DoDestroy
lldb_private::Status DoDestroy() override
Definition: ProcessFreeBSDKernel.cpp:113
ProcessFreeBSDKernel::FindSymbol
lldb::addr_t FindSymbol(const char *name)
Definition: ProcessFreeBSDKernel.cpp:269
ProcessFreeBSDKernel
Definition: ProcessFreeBSDKernel.h:14
ProcessFreeBSDKernel::GetDynamicLoader
lldb_private::DynamicLoader * GetDynamicLoader() override
Get the dynamic loader plug-in for this process.
Definition: ProcessFreeBSDKernel.cpp:262
ProcessFreeBSDKernel::Terminate
static void Terminate()
Definition: ProcessFreeBSDKernel.cpp:109