#include "DynamicLoaderDarwin.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/Expression/DiagnosticManager.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.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/ThreadPlanCallFunction.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/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#ifdef ENABLE_DEBUG_PRINTF
#include <cstdio>
#define DEBUG_PRINTF …
#else
#define DEBUG_PRINTF(fmt, ...) …
#endif
#include <memory>
usingnamespacelldb;
usingnamespacelldb_private;
DynamicLoaderDarwin::DynamicLoaderDarwin(Process *process)
: … { … }
DynamicLoaderDarwin::~DynamicLoaderDarwin() = default;
void DynamicLoaderDarwin::DidAttach() { … }
void DynamicLoaderDarwin::DidLaunch() { … }
void DynamicLoaderDarwin::Clear(bool clear_process) { … }
ModuleSP DynamicLoaderDarwin::FindTargetModuleForImageInfo(
ImageInfo &image_info, bool can_create, bool *did_create_ptr) { … }
void DynamicLoaderDarwin::UnloadImages(
const std::vector<lldb::addr_t> &solib_addresses) { … }
void DynamicLoaderDarwin::UnloadAllImages() { … }
bool DynamicLoaderDarwin::UpdateImageLoadAddress(Module *module,
ImageInfo &info) { … }
bool DynamicLoaderDarwin::UnloadModuleSections(Module *module,
ImageInfo &info) { … }
bool DynamicLoaderDarwin::JSONImageInformationIntoImageInfo(
StructuredData::ObjectSP image_details,
ImageInfo::collection &image_infos) { … }
void DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(
ImageInfo::collection &image_infos) { … }
void DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(
ImageInfo &image_info) { … }
std::optional<lldb_private::Address> DynamicLoaderDarwin::GetStartAddress() { … }
void DynamicLoaderDarwin::SetDYLDModule(lldb::ModuleSP &dyld_module_sp) { … }
ModuleSP DynamicLoaderDarwin::GetDYLDModule() { … }
void DynamicLoaderDarwin::ClearDYLDModule() { … }
bool DynamicLoaderDarwin::AddModulesUsingImageInfos(
ImageInfo::collection &image_infos) { … }
bool DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(SymbolContext &sym_ctx) { … }
void DynamicLoaderDarwin::Segment::PutToLog(Log *log,
lldb::addr_t slide) const { … }
lldb_private::ArchSpec DynamicLoaderDarwin::ImageInfo::GetArchitecture() const { … }
const DynamicLoaderDarwin::Segment *
DynamicLoaderDarwin::ImageInfo::FindSegment(ConstString name) const { … }
void DynamicLoaderDarwin::ImageInfo::PutToLog(Log *log) const { … }
void DynamicLoaderDarwin::PrivateInitialize(Process *process) { … }
void DynamicLoaderDarwin::PrivateProcessStateChanged(Process *process,
StateType state) { … }
ThreadPlanSP
DynamicLoaderDarwin::GetStepThroughTrampolinePlan(Thread &thread,
bool stop_others) { … }
void DynamicLoaderDarwin::FindEquivalentSymbols(
lldb_private::Symbol *original_symbol, lldb_private::ModuleList &images,
lldb_private::SymbolContextList &equivalent_symbols) { … }
lldb::ModuleSP DynamicLoaderDarwin::GetPThreadLibraryModule() { … }
Address DynamicLoaderDarwin::GetPthreadSetSpecificAddress() { … }
lldb::addr_t
DynamicLoaderDarwin::GetThreadLocalData(const lldb::ModuleSP module_sp,
const lldb::ThreadSP thread_sp,
lldb::addr_t tls_file_addr) { … }
bool DynamicLoaderDarwin::UseDYLDSPI(Process *process) { … }