#include "lldb/Breakpoint/StoppointCallbackContext.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Section.h"
#include "lldb/Host/StreamFile.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/OperatingSystem.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadPlanRunToAddress.h"
#include "lldb/Utility/DataBuffer.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
#include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
#include "DynamicLoaderFreeBSDKernel.h"
#include <memory>
#include <mutex>
usingnamespacelldb;
usingnamespacelldb_private;
LLDB_PLUGIN_DEFINE(…)
void DynamicLoaderFreeBSDKernel::Initialize() { … }
void DynamicLoaderFreeBSDKernel::Terminate() { … }
llvm::StringRef DynamicLoaderFreeBSDKernel::GetPluginDescriptionStatic() { … }
static bool is_kernel(Module *module) { … }
static bool is_kmod(Module *module) { … }
static bool is_reloc(Module *module) { … }
DynamicLoader *
DynamicLoaderFreeBSDKernel::CreateInstance(lldb_private::Process *process,
bool force) { … }
addr_t
DynamicLoaderFreeBSDKernel::FindFreeBSDKernel(lldb_private::Process *process) { … }
addr_t DynamicLoaderFreeBSDKernel::FindKernelAtLoadAddress(
lldb_private::Process *process) { … }
bool DynamicLoaderFreeBSDKernel::ReadELFHeader(Process *process,
lldb::addr_t addr,
llvm::ELF::Elf32_Ehdr &header,
bool *read_error) { … }
lldb_private::UUID DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(
Process *process, lldb::addr_t addr, bool *read_error) { … }
void DynamicLoaderFreeBSDKernel::DebuggerInit(
lldb_private::Debugger &debugger) { … }
DynamicLoaderFreeBSDKernel::DynamicLoaderFreeBSDKernel(Process *process,
addr_t kernel_address)
: … { … }
DynamicLoaderFreeBSDKernel::~DynamicLoaderFreeBSDKernel() { … }
void DynamicLoaderFreeBSDKernel::Update() { … }
bool DynamicLoaderFreeBSDKernel::KModImageInfo::ReadMemoryModule(
lldb_private::Process *process) { … }
bool DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(
lldb_private::Process *process) { … }
bool DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingFileAddress(
lldb_private::Process *process) { … }
bool DynamicLoaderFreeBSDKernel::ReadKmodsListHeader() { … }
bool DynamicLoaderFreeBSDKernel::ParseKmods(Address linker_files_head_addr) { … }
bool DynamicLoaderFreeBSDKernel::ReadAllKmods(
Address linker_files_head_addr,
KModImageInfo::collection_type &kmods_list) { … }
void DynamicLoaderFreeBSDKernel::ReadAllKmods() { … }
void DynamicLoaderFreeBSDKernel::LoadKernelModules() { … }
void DynamicLoaderFreeBSDKernel::SetNotificationBreakPoint() { … }
void DynamicLoaderFreeBSDKernel::DidAttach() { … }
void DynamicLoaderFreeBSDKernel::DidLaunch() { … }
void DynamicLoaderFreeBSDKernel::Clear(bool clear_process) { … }
void DynamicLoaderFreeBSDKernel::PrivateInitialize(Process *process) { … }
ThreadPlanSP DynamicLoaderFreeBSDKernel::GetStepThroughTrampolinePlan(
lldb_private::Thread &thread, bool stop_others) { … }
Status DynamicLoaderFreeBSDKernel::CanLoadImage() { … }