#include "AppleObjCTrampolineHandler.h"
#include "AppleThreadPlanStepThroughObjCTrampoline.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/Value.h"
#include "lldb/Expression/DiagnosticManager.h"
#include "lldb/Expression/FunctionCaller.h"
#include "lldb/Expression/UserExpression.h"
#include "lldb/Expression/UtilityFunction.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Target/ABI.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadPlanRunToAddress.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
#include <memory>
usingnamespacelldb;
usingnamespacelldb_private;
const char *AppleObjCTrampolineHandler::g_lookup_implementation_function_name = …;
const char *AppleObjCTrampolineHandler::
g_lookup_implementation_with_stret_function_code = …;
const char *
AppleObjCTrampolineHandler::g_lookup_implementation_no_stret_function_code = …;
const char
*AppleObjCTrampolineHandler::g_lookup_implementation_function_common_code = …;
AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::VTableRegion(
AppleObjCVTables *owner, lldb::addr_t header_addr)
: … { … }
AppleObjCTrampolineHandler::~AppleObjCTrampolineHandler() = default;
void AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::SetUpRegion() { … }
bool AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::
AddressInRegion(lldb::addr_t addr, uint32_t &flags) { … }
void AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::Dump(
Stream &s) { … }
AppleObjCTrampolineHandler::AppleObjCVTables::AppleObjCVTables(
const ProcessSP &process_sp, const ModuleSP &objc_module_sp)
: … { … }
AppleObjCTrampolineHandler::AppleObjCVTables::~AppleObjCVTables() { … }
bool AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols() { … }
bool AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(
void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id,
lldb::user_id_t break_loc_id) { … }
bool AppleObjCTrampolineHandler::AppleObjCVTables::ReadRegions() { … }
bool AppleObjCTrampolineHandler::AppleObjCVTables::ReadRegions(
lldb::addr_t region_addr) { … }
bool AppleObjCTrampolineHandler::AppleObjCVTables::IsAddressInVTables(
lldb::addr_t addr, uint32_t &flags) { … }
const AppleObjCTrampolineHandler::DispatchFunction
AppleObjCTrampolineHandler::g_dispatch_functions[] = …;
const char *AppleObjCTrampolineHandler::g_opt_dispatch_names[] = …;
AppleObjCTrampolineHandler::AppleObjCTrampolineHandler(
const ProcessSP &process_sp, const ModuleSP &objc_module_sp)
: … { … }
lldb::addr_t
AppleObjCTrampolineHandler::SetupDispatchFunction(Thread &thread,
ValueList &dispatch_values) { … }
const AppleObjCTrampolineHandler::DispatchFunction *
AppleObjCTrampolineHandler::FindDispatchFunction(lldb::addr_t addr) { … }
void AppleObjCTrampolineHandler::ForEachDispatchFunction(
std::function<void(lldb::addr_t, const DispatchFunction &)> callback) { … }
ThreadPlanSP
AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread,
bool stop_others) { … }
FunctionCaller *
AppleObjCTrampolineHandler::GetLookupImplementationFunctionCaller() { … }