LLDB mainline
|
#include <ABI.h>
Classes | |
struct | CallArgument |
Static Public Member Functions | |
static lldb::ABISP | FindPlugin (lldb::ProcessSP process_sp, const ArchSpec &arch) |
Protected Member Functions | |
virtual lldb::ValueObjectSP | GetReturnValueObjectImpl (Thread &thread, CompilerType &ast_type) const =0 |
virtual lldb::ValueObjectSP | GetReturnValueObjectImpl (Thread &thread, llvm::Type &ir_type) const |
lldb::ProcessSP | GetProcessSP () const |
Request to get a Process shared pointer. | |
ABI (lldb::ProcessSP process_sp, std::unique_ptr< llvm::MCRegisterInfo > info_up) |
Static Protected Member Functions | |
static std::unique_ptr< llvm::MCRegisterInfo > | MakeMCRegisterInfo (const ArchSpec &arch) |
Utility function to construct a MCRegisterInfo using the ArchSpec triple. |
Protected Attributes | |
lldb::ProcessWP | m_process_wp |
std::unique_ptr< llvm::MCRegisterInfo > | m_mc_register_info_up |
Private Member Functions | |
ABI (const ABI &)=delete | |
const ABI & | operator= (const ABI &)=delete |
|
overridedefault |
|
inlineprotected |
Definition at line 156 of file ABI.h.
References m_mc_register_info_up, and m_process_wp.
Referenced by ABI(), and operator=().
|
pure virtual |
Implemented in ABIAArch64, ABISysV_loongarch, ABISysV_riscv, ABIX86, lldb_private::MCBasedABI, and lldb_private::RegInfoBasedABI.
|
pure virtual |
Implemented in ABIMacOSX_arm64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm64, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
Referenced by lldb_private::UnwindLLDB::GetOneMoreFrame().
|
pure virtual |
Implemented in ABIMacOSX_arm64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm64, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
References pc.
Referenced by lldb_private::UnwindLLDB::GetOneMoreFrame().
|
pure virtual |
Implemented in ABIAArch64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
Referenced by lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame().
|
pure virtual |
Implemented in ABIAArch64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
Referenced by lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame().
|
static |
Definition at line 27 of file ABI.cpp.
References lldb_private::PluginManager::GetABICreateCallbackAtIndex().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::AddRemoteRegisters(), lldb_private::VariableAnnotator::annotate(), lldb_private::Address::Dump(), lldb_private::Variable::Dump(), lldb_private::Variable::DumpLocations(), lldb_private::Process::GetABI(), lldb_private::Target::GetABIName(), and lldb::SBTarget::GetStackRedZoneSize().
|
inlinevirtual |
Use this method when you do not know, or do not care what kind of address you are fixing.
On platforms where there would be a difference between the two types, it will pick the safest option.
Its purpose is to signal that no specific choice was made and provide an alternative to randomly picking FixCode/FixData address. Which could break platforms where there is a difference (only Arm Thumb at this time).
Definition at line 137 of file ABI.h.
References FixDataAddress(), and pc.
|
virtual |
Some targets might use bits in a code address to indicate a mode switch.
ARM uses bit zero to signify a code address is thumb, so any ARM ABI plug-ins would strip those bits.
Reimplemented in ABIAArch64, ABIMacOSX_arm64, ABIMacOSX_arm, ABISysV_arm64, and ABISysV_arm.
Definition at line 150 of file ABI.cpp.
References GetProcessSP(), LLDB_INVALID_ADDRESS_MASK, and pc.
Referenced by CommandObjectTargetModulesShowUnwind::DoExecute().
|
virtual |
Reimplemented in ABIAArch64, ABIMacOSX_arm64, and ABISysV_arm64.
Definition at line 167 of file ABI.cpp.
References GetProcessSP(), LLDB_INVALID_ADDRESS_MASK, and pc.
Referenced by FixAnyAddress().
|
pure virtual |
Implemented in ABIMacOSX_arm64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm64, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
Referenced by lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::ThreadPlanAssemblyTracer::Log(), and lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines().
|
virtual |
Reimplemented in ABISysV_s390x.
Definition at line 211 of file ABI.cpp.
References lldb::eRegisterKindGeneric, lldb_private::RegisterInfo::kinds, LLDB_REGNUM_GENERIC_SP, RegisterIsVolatile(), lldb_private::UnwindPlan::Row::AbstractRegisterLocation::SetIsCFAPlusOffset(), and lldb_private::UnwindPlan::Row::AbstractRegisterLocation::SetUndefined().
Referenced by lldb_private::RegisterContextUnwind::GetAbstractRegisterLocation().
|
inline |
Definition at line 144 of file ABI.h.
References m_mc_register_info_up.
Referenced by lldb_private::DWARFExpression::DumpLocation().
|
inlinevirtual |
Reimplemented in ABISysV_arm64, ABISysV_x86_64, and ABIWindows_x86_64.
|
inlineprotected |
Request to get a Process shared pointer.
This ABI object may not have been created with a Process object, or the Process object may no longer be alive. Be sure to handle the case where the shared pointer returned does not have an object inside it.
Definition at line 97 of file ABI.h.
References m_process_wp.
Referenced by ABIX86::AugmentRegisterInfo(), ABISysV_riscv::CallFrameAddressIsValid(), ABISysV_riscv::CodeAddressIsValid(), ABIAArch64::FixCodeAddress(), ABIMacOSX_arm64::FixCodeAddress(), ABISysV_arm64::FixCodeAddress(), FixCodeAddress(), ABIAArch64::FixDataAddress(), ABIMacOSX_arm64::FixDataAddress(), ABISysV_arm64::FixDataAddress(), FixDataAddress(), ABISysV_ppc64::GetByteOrder(), ABIMacOSX_arm::IsArmv7kProcess(), ABISysV_arm64::PrepareTrivialCall(), ABISysV_loongarch::RegisterIsCalleeSaved(), and ABISysV_riscv::RegisterIsCalleeSaved().
|
pure virtual |
Implemented in ABIMacOSX_arm64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm64, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
Referenced by lldb_private::ThreadPlanCallFunction::ConstructorSetup().
ValueObjectSP ABI::GetReturnValueObject | ( | Thread & | thread, |
CompilerType & | type, | ||
bool | persistent = true ) const |
Definition at line 70 of file ABI.cpp.
References lldb_private::Target::CalculateTarget(), lldb_private::PersistentExpressionState::CreatePersistentVariable(), lldb_private::ExpressionVariable::EVIsFreezeDried, lldb_private::ExpressionVariable::EVIsLLDBAllocated, lldb_private::ExpressionVariable::EVIsProgramReference, lldb_private::ExpressionVariable::EVNeedsAllocation, lldb_private::Value::FileAddress, lldb_private::CompilerType::GetMinimumLanguage(), lldb_private::PersistentExpressionState::GetNextPersistentVariableName(), lldb_private::Target::GetPersistentExpressionStateForLanguage(), GetReturnValueObjectImpl(), lldb_private::Value::GetValueType(), lldb_private::Value::HostAddress, lldb_private::Value::Invalid, lldb_private::CompilerType::IsValid(), lldb_private::Value::LoadAddress, and lldb_private::Value::Scalar.
Referenced by lldb_private::ThreadPlanCallFunction::SetReturnValue(), and lldb_private::ThreadPlanCallFunctionUsingABI::SetReturnValue().
ValueObjectSP ABI::GetReturnValueObject | ( | Thread & | thread, |
llvm::Type & | type, | ||
bool | persistent = true ) const |
Definition at line 183 of file ABI.cpp.
References GetReturnValueObjectImpl().
|
protectedpure virtual |
Implemented in ABIMacOSX_arm64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm64, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
Referenced by GetReturnValueObject(), and GetReturnValueObject().
|
protectedvirtual |
Reimplemented in ABISysV_arc, ABISysV_hexagon, and ABISysV_riscv.
|
inlinevirtual |
Reimplemented in ABISysV_msp430.
|
staticprotected |
Utility function to construct a MCRegisterInfo using the ArchSpec triple.
Plugins wishing to customize the construction can construct the MCRegisterInfo themselves.
Definition at line 234 of file ABI.cpp.
References lldb_private::GetLog(), lldb_private::ArchSpec::GetTriple(), LLDB_LOG, and lldb_private::Process.
Referenced by ABIMacOSX_arm64::CreateInstance(), ABIMacOSX_arm::CreateInstance(), ABIMacOSX_i386::CreateInstance(), ABISysV_arc::CreateInstance(), ABISysV_arm64::CreateInstance(), ABISysV_arm::CreateInstance(), ABISysV_hexagon::CreateInstance(), ABISysV_i386::CreateInstance(), ABISysV_loongarch::CreateInstance(), ABISysV_mips64::CreateInstance(), ABISysV_mips::CreateInstance(), ABISysV_msp430::CreateInstance(), ABISysV_ppc64::CreateInstance(), ABISysV_ppc::CreateInstance(), ABISysV_riscv::CreateInstance(), ABISysV_s390x::CreateInstance(), ABISysV_x86_64::CreateInstance(), and ABIWindows_x86_64::CreateInstance().
|
pure virtual |
Implemented in ABIMacOSX_arm64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm64, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
References sp.
Referenced by lldb_private::ThreadPlanCallFunctionUsingABI::ThreadPlanCallFunctionUsingABI().
|
virtual |
References sp.
|
pure virtual |
Implemented in ABIMacOSX_arm64, ABIMacOSX_arm, ABIMacOSX_i386, ABISysV_arc, ABISysV_arm64, ABISysV_arm, ABISysV_hexagon, ABISysV_i386, ABISysV_loongarch, ABISysV_mips64, ABISysV_mips, ABISysV_msp430, ABISysV_ppc64, ABISysV_ppc, ABISysV_riscv, ABISysV_s390x, ABISysV_x86_64, and ABIWindows_x86_64.
Referenced by GetFallbackRegisterLocation().
|
pure virtual |
|
protected |
Definition at line 168 of file ABI.h.
Referenced by ABI(), lldb_private::MCBasedABI::GetEHAndDWARFNums(), and GetMCRegisterInfo().
|
protected |
Definition at line 167 of file ABI.h.
Referenced by ABI(), and GetProcessSP().