Go to the documentation of this file.
9 #ifndef LLDB_SOURCE_PLUGINS_DYNAMICLOADER_DARWIN_KERNEL_DYNAMICLOADERDARWINKERNEL_H
10 #define LLDB_SOURCE_PLUGINS_DYNAMICLOADER_DARWIN_KERNEL_DYNAMICLOADERDARWINKERNEL_H
56 bool stop_others)
override;
73 void Clear(
bool clear_process);
256 bool update_executable);
275 bool *read_error =
nullptr);
280 bool *read_error =
nullptr);
298 #endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_DARWIN_KERNEL_DYNAMICLOADERDARWINKERNEL_H
std::vector< KextImageInfo > collection
void SetModule(lldb::ModuleSP module)
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
static lldb::addr_t SearchForKernelWithDebugHints(lldb_private::Process *process)
uint32_t GetProcessStopId() const
void PutToLog(lldb_private::Log *log) const
static void DebuggerInitialize(lldb_private::Debugger &debugger)
OSKextLoadedKextSummaryHeader m_kext_summary_header
std::recursive_mutex m_mutex
lldb::addr_t m_kernel_load_address
const DynamicLoaderDarwinKernel & operator=(const DynamicLoaderDarwinKernel &)=delete
lldb_private::UUID GetUUID() const
lldb::ModuleSP GetModule()
lldb::addr_t m_load_address
static lldb::addr_t SearchForDarwinKernel(lldb_private::Process *process)
KextImageInfo::collection m_known_kexts
void SetName(const char *)
collection::iterator iterator
void RegisterNotificationCallbacks()
void PrivateProcessStateChanged(lldb_private::Process *process, lldb::StateType state)
lldb::ModuleSP m_memory_module_sp
static lldb::addr_t SearchForKernelAtSameLoadAddr(lldb_private::Process *process)
bool ParseKextSummaries(const lldb_private::Address &kext_summary_addr, uint32_t count)
void Clear(bool clear_process)
static lldb_private::DynamicLoader * CreateInstance(lldb_private::Process *process, bool force)
lldb_private::ArchSpec GetArchitecture() const
DynamicLoaderDarwinKernel(lldb_private::Process *process, lldb::addr_t kernel_addr)
bool LoadImageUsingMemoryModule(lldb_private::Process *process)
llvm::StringRef GetPluginName() override
static bool BreakpointHitCallback(void *baton, lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
lldb_private::Status CanLoadImage() override
Ask if it is ok to try and load or unload an shared library (image).
~DynamicLoaderDarwinKernel() override
collection::const_iterator const_iterator
bool ReadMemoryModule(lldb_private::Process *process)
lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread, bool stop_others) override
Provides a plan to step through the dynamic loader trampoline for the current state of thread.
std::string GetName() const
bool LoadImageAtFileAddress(lldb_private::Process *process)
void PrivateInitialize(lldb_private::Process *process)
string(SUBSTRING ${p} 10 -1 pStripped) if($
void SetLoadAddress(lldb::addr_t load_addr)
lldb_private::UUID m_uuid
void SetUUID(const lldb_private::UUID &uuid)
static bool ReadMachHeader(lldb::addr_t addr, lldb_private::Process *process, llvm::MachO::mach_header &mh, bool *read_error=nullptr)
void SetNotificationBreakpointIfNeeded()
static lldb::ByteOrder GetByteOrderFromMagic(uint32_t magic)
void SetProcessStopId(uint32_t stop_id)
uint32_t ReadKextSummaries(const lldb_private::Address &kext_summary_addr, uint32_t image_infos_count, KextImageInfo::collection &image_infos)
void SetIsKernel(bool is_kernel)
static lldb_private::UUID CheckForKernelImageAtAddress(lldb::addr_t addr, lldb_private::Process *process, bool *read_error=nullptr)
void SetSize(uint64_t size)
bool BreakpointHit(lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
void UpdateImageInfosHeaderAndLoadCommands(KextImageInfo::collection &image_infos, uint32_t infos_count, bool update_executable)
lldb::ModuleSP m_module_sp
void PutToLog(lldb_private::Log *log) const
bool ReadAllKextSummaries()
lldb_private::Address m_kext_summary_header_ptr_addr
bool ReadKextSummaryHeader()
static llvm::StringRef GetPluginNameStatic()
uint32_t m_load_process_stop_id
lldb_private::Address m_kext_summary_header_addr
static lldb::addr_t SearchForKernelNearPC(lldb_private::Process *process)
#define LLDB_INVALID_ADDRESS
bool operator==(const KextImageInfo &rhs)
uint32_t GetAddressByteSize()
static llvm::StringRef GetPluginDescriptionStatic()
void DidAttach() override
Called after attaching a process.
void UnregisterNotificationCallbacks()
StateType
Process and Thread States.
uint32_t GetAddrByteSize()
void DidLaunch() override
Called after attaching a process.
@ KERNEL_MODULE_ENTRY_SIZE_VERSION_1
lldb::ByteOrder GetByteOrder()
lldb::addr_t GetLoadAddress() const
void LoadKernelModuleIfNeeded()
lldb::user_id_t m_break_id
ByteOrder
Byte ordering definitions.
static lldb::addr_t SearchForKernelViaExhaustiveSearch(lldb_private::Process *process)