#include "DynamicLoaderMacOSXDYLD.h"
#include "DynamicLoaderDarwin.h"
#include "DynamicLoaderMacOS.h"
#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#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/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/ABI.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"
#ifdef ENABLE_DEBUG_PRINTF
#include <cstdio>
#define DEBUG_PRINTF …
#else
#define DEBUG_PRINTF(fmt, ...) …
#endif
#ifndef __APPLE__
#include "lldb/Utility/AppleUuidCompatibility.h"
#else
#include <uuid/uuid.h>
#endif
usingnamespacelldb;
usingnamespacelldb_private;
LLDB_PLUGIN_DEFINE(…)
DynamicLoader *DynamicLoaderMacOSXDYLD::CreateInstance(Process *process,
bool force) { … }
DynamicLoaderMacOSXDYLD::DynamicLoaderMacOSXDYLD(Process *process)
: … { … }
DynamicLoaderMacOSXDYLD::~DynamicLoaderMacOSXDYLD() { … }
bool DynamicLoaderMacOSXDYLD::ProcessDidExec() { … }
void DynamicLoaderMacOSXDYLD::DoClear() { … }
bool DynamicLoaderMacOSXDYLD::DidSetNotificationBreakpoint() { … }
void DynamicLoaderMacOSXDYLD::ClearNotificationBreakpoint() { … }
void DynamicLoaderMacOSXDYLD::DoInitialImageFetch() { … }
bool DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(
lldb::addr_t addr) { … }
bool DynamicLoaderMacOSXDYLD::NeedToDoInitialImageFetch() { … }
bool DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(
void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id,
lldb::user_id_t break_loc_id) { … }
bool DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure() { … }
bool DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfosAddress(
lldb::addr_t image_infos_addr, uint32_t image_infos_count) { … }
bool DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(
lldb::addr_t image_infos_addr, uint32_t image_infos_count) { … }
bool DynamicLoaderMacOSXDYLD::ReadImageInfos(
lldb::addr_t image_infos_addr, uint32_t image_infos_count,
ImageInfo::collection &image_infos) { … }
bool DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos() { … }
bool DynamicLoaderMacOSXDYLD::ReadMachHeader(lldb::addr_t addr,
llvm::MachO::mach_header *header,
DataExtractor *load_command_data) { … }
uint32_t DynamicLoaderMacOSXDYLD::ParseLoadCommands(const DataExtractor &data,
ImageInfo &dylib_info,
FileSpec *lc_id_dylinker) { … }
void DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(
ImageInfo::collection &image_infos, uint32_t infos_count,
bool update_executable) { … }
void DynamicLoaderMacOSXDYLD::PutToLog(Log *log) const { … }
bool DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint() { … }
Status DynamicLoaderMacOSXDYLD::CanLoadImage() { … }
bool DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(
lldb::addr_t &base_address, UUID &uuid, LazyBool &using_shared_cache,
LazyBool &private_shared_cache) { … }
bool DynamicLoaderMacOSXDYLD::IsFullyInitialized() { … }
void DynamicLoaderMacOSXDYLD::Initialize() { … }
void DynamicLoaderMacOSXDYLD::Terminate() { … }
llvm::StringRef DynamicLoaderMacOSXDYLD::GetPluginDescriptionStatic() { … }
uint32_t DynamicLoaderMacOSXDYLD::AddrByteSize() { … }
lldb::ByteOrder DynamicLoaderMacOSXDYLD::GetByteOrderFromMagic(uint32_t magic) { … }