LLDB
mainline
|
#include "lldb/Utility/ArchSpec.h"
Public Member Functions | |
ArchSpec () | |
Default constructor. More... | |
ArchSpec (const llvm::Triple &triple) | |
Constructor over triple. More... | |
ArchSpec (const char *triple_cstr) | |
ArchSpec (llvm::StringRef triple_str) | |
ArchSpec (ArchitectureType arch_type, uint32_t cpu_type, uint32_t cpu_subtype) | |
Constructor over architecture name. More... | |
~ArchSpec () | |
Destructor. More... | |
const char * | GetArchitectureName () const |
Returns a static string representing the current architecture. More... | |
bool | IsMIPS () const |
if MIPS architecture return true. More... | |
std::string | GetClangTargetCPU () const |
Returns a string representing current architecture as a target CPU for tools like compiler, disassembler etc. More... | |
std::string | GetTargetABI () const |
Return a string representing target application ABI. More... | |
void | Clear () |
Clears the object state. More... | |
uint32_t | GetAddressByteSize () const |
Returns the size in bytes of an address of the current architecture. More... | |
llvm::Triple::ArchType | GetMachine () const |
Returns a machine family for the current architecture. More... | |
ConstString | GetDistributionId () const |
Returns the distribution id of the architecture. More... | |
void | SetDistributionId (const char *distribution_id) |
Set the distribution id of the architecture. More... | |
bool | IsValid () const |
Tests if this ArchSpec is valid. More... | |
operator bool () const | |
bool | TripleVendorWasSpecified () const |
bool | TripleOSWasSpecified () const |
bool | TripleEnvironmentWasSpecified () const |
void | MergeFrom (const ArchSpec &other) |
Merges fields from another ArchSpec into this ArchSpec. More... | |
bool | SetArchitecture (ArchitectureType arch_type, uint32_t cpu, uint32_t sub, uint32_t os=0) |
Change the architecture object type, CPU type and OS type. More... | |
lldb::ByteOrder | GetByteOrder () const |
Returns the byte order for the architecture specification. More... | |
void | SetByteOrder (lldb::ByteOrder byte_order) |
Sets this ArchSpec's byte order. More... | |
uint32_t | GetMinimumOpcodeByteSize () const |
uint32_t | GetMaximumOpcodeByteSize () const |
Core | GetCore () const |
uint32_t | GetMachOCPUType () const |
uint32_t | GetMachOCPUSubType () const |
uint32_t | GetDataByteSize () const |
Architecture data byte width accessor. More... | |
uint32_t | GetCodeByteSize () const |
Architecture code byte width accessor. More... | |
llvm::Triple & | GetTriple () |
Architecture triple accessor. More... | |
const llvm::Triple & | GetTriple () const |
Architecture triple accessor. More... | |
void | DumpTriple (llvm::raw_ostream &s) const |
bool | SetTriple (const llvm::Triple &triple) |
Architecture triple setter. More... | |
bool | SetTriple (llvm::StringRef triple_str) |
lldb::ByteOrder | GetDefaultEndian () const |
Returns the default endianness of the architecture. More... | |
bool | CharIsSignedByDefault () const |
Returns true if 'char' is a signed type by default in the architecture false otherwise. More... | |
bool | IsExactMatch (const ArchSpec &rhs) const |
Compare an ArchSpec to another ArchSpec, requiring an exact cpu type match between them. More... | |
bool | IsCompatibleMatch (const ArchSpec &rhs) const |
Compare an ArchSpec to another ArchSpec, requiring a compatible cpu type match between them. More... | |
bool | IsFullySpecifiedTriple () const |
void | PiecewiseTripleCompare (const ArchSpec &other, bool &arch_different, bool &vendor_different, bool &os_different, bool &os_version_different, bool &env_different) const |
bool | IsAlwaysThumbInstructions () const |
Detect whether this architecture uses thumb code exclusively. More... | |
uint32_t | GetFlags () const |
void | SetFlags (uint32_t flags) |
void | SetFlags (const std::string &elf_abi) |
Static Public Member Functions | |
static bool | ContainsOnlyArch (const llvm::Triple &normalized_triple) |
Returns true if the OS, vendor and environment fields of the triple are unset. More... | |
static void | ListSupportedArchNames (StringList &list) |
static void | AutoComplete (CompletionRequest &request) |
Protected Member Functions | |
bool | IsEqualTo (const ArchSpec &rhs, bool exact_match) const |
void | UpdateCore () |
void | CoreUpdated (bool update_triple) |
Protected Attributes | |
llvm::Triple | m_triple |
Core | m_core = kCore_invalid |
lldb::ByteOrder | m_byte_order = lldb::eByteOrderInvalid |
uint32_t | m_flags = 0 |
ConstString | m_distribution_id |
An architecture specification class.
A class designed to be created from a cpu type and subtype, a string representation, or an llvm::Triple. Keeping all of the conversions of strings to architecture enumeration values confined to this class allows new architecture support to be added easily.
Definition at line 33 of file ArchSpec.h.
Enumerator | |
---|---|
eARM_abi_soft_float | |
eARM_abi_hard_float |
Definition at line 90 of file ArchSpec.h.
Definition at line 112 of file ArchSpec.h.
Enumerator | |
---|---|
eMIPS_ABI_FP_ANY | |
eMIPS_ABI_FP_DOUBLE | |
eMIPS_ABI_FP_SINGLE | |
eMIPS_ABI_FP_SOFT | |
eMIPS_ABI_FP_OLD_64 | |
eMIPS_ABI_FP_XX | |
eMIPS_ABI_FP_64 | |
eMIPS_ABI_FP_64A | |
eMIPS_ABI_FP_mask |
Definition at line 77 of file ArchSpec.h.
Definition at line 52 of file ArchSpec.h.
Definition at line 35 of file ArchSpec.h.
Definition at line 95 of file ArchSpec.h.
Enumerator | |
---|---|
eRISCVSubType_unknown | |
eRISCVSubType_riscv32 | |
eRISCVSubType_riscv64 |
Definition at line 106 of file ArchSpec.h.
|
default |
Default constructor.
Default constructor that initializes the object with invalid cpu type and subtype values.
|
explicit |
Constructor over triple.
Constructs an ArchSpec with properties consistent with the given Triple.
Definition at line 520 of file ArchSpec.cpp.
|
explicit |
Definition at line 513 of file ArchSpec.cpp.
|
explicit |
Definition at line 518 of file ArchSpec.cpp.
|
explicit |
Constructor over architecture name.
Constructs an ArchSpec with properties consistent with the given object type and architecture name.
Definition at line 522 of file ArchSpec.cpp.
|
default |
Destructor.
|
static |
Definition at line 262 of file ArchSpec.cpp.
References g_core_definitions, lldb_private::CoreDefinition::name, and lldb_private::CompletionRequest::TryCompleteCurrentArg().
Referenced by lldb_private::CommandCompletions::ArchitectureNames().
bool ArchSpec::CharIsSignedByDefault | ( | ) | const |
Returns true if 'char' is a signed type by default in the architecture false otherwise.
Definition at line 705 of file ArchSpec.cpp.
Referenced by lldb_private::ClangExpressionParser::ClangExpressionParser(), and ParseLangArgs().
void ArchSpec::Clear | ( | ) |
Clears the object state.
Clears the object state back to a default invalid state.
Definition at line 528 of file ArchSpec.cpp.
References lldb::eByteOrderInvalid.
Referenced by lldb_private::ProcessInfo::Clear(), lldb_private::ModuleSpec::Clear(), lldb_private::HostInfoMacOSX::ComputeHostArchitectureSupport(), lldb_private::HostInfoBase::ComputeHostArchitectureSupport(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidAttach(), lldb_private::Process::DidAttach(), GetFreeBSDProcessCPUType(), ProcessKDP::GetHostArchitecture(), GetMacOSXProcessCPUType(), GetNetBSDProcessCPUType(), GetOpenBSDProcessCPUType(), lldb_private::PlatformList::GetOrCreate(), lldb_private::Platform::IsCompatibleArchitecture(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ResetDiscoverableSettings().
|
static |
Returns true if the OS, vendor and environment fields of the triple are unset.
The triple is expected to be normalized (llvm::Triple::normalize).
Definition at line 795 of file ArchSpec.cpp.
Referenced by lldb_private::Platform::GetAugmentedArchSpec().
|
protected |
Definition at line 1065 of file ArchSpec.cpp.
References lldb_private::CoreDefinition::default_byte_order, lldb::eByteOrderInvalid, FindCoreDefinition(), and lldb_private::CoreDefinition::name.
void ArchSpec::DumpTriple | ( | llvm::raw_ostream & | s | ) | const |
Definition at line 1467 of file ArchSpec.cpp.
Referenced by lldb_private::ProcessInfo::Dump(), lldb_private::ProcessInstanceInfo::Dump(), lldb_private::ModuleSpec::Dump(), lldb_private::ProcessInstanceInfo::DumpAsTableRow(), DumpModuleArchitecture(), DumpTargetInfo(), and lldb_private::Platform::GetStatus().
uint32_t ArchSpec::GetAddressByteSize | ( | ) | const |
Returns the size in bytes of an address of the current architecture.
Definition at line 684 of file ArchSpec.cpp.
References lldb_private::CoreDefinition::addr_byte_size, FindCoreDefinition(), and lldb_private::CoreDefinition::machine.
Referenced by ConvertPDBLocationToDWARFExpression(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::Disassembler::DisassembleBytes(), lldb_private::IRExecutionUnit::DisassembleFunction(), CommandObjectMemoryRead::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::AddressRange::Dump(), lldb_private::Address::Dump(), lldb_private::StackFrame::Dump(), DumpAddressAndContent(), CommandObjectSourceInfo::DumpLinesInFunctions(), OptionGroupReadMemory::FinalizeSettings(), lldb_private::breakpad::ObjectFileBreakpad::GetAddressByteSize(), lldb_private::wasm::ObjectFileWasm::GetAddressByteSize(), lldb_private::NativeProcessProtocol::GetAddressByteSize(), lldb_private::EmulateInstruction::GetAddressByteSize(), lldb_private::Process::GetAddressByteSize(), GetByteOrderAndAddrSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), ABIWindows_x86_64::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), lldb_private::Thread::GetSiginfoValue(), ELFLinuxPrStatus::GetSize(), ELFLinuxPrPsInfo::GetSize(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::Value::GetValueAsData(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), lldb_private::RenderScriptRuntime::LoadRuntimeHooks(), MakeLocationExpressionInternal(), DynamicLoaderMacOS::NotifyBreakpointHit(), lldb_private::Disassembler::ParseInstructions(), CommandObjectTargetModulesList::PrintModule(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), JITLoaderGDB::ReadJITDescriptor(), lldb_private::Target::ReadPointerFromMemory(), lldb_private::Target::ReadScalarIntegerFromMemory(), lldb_private::HostInfoAndroid::ResolveLibraryPath(), lldb_private::breakpad::SymbolFileBreakpad::SaveAsDWARF(), ObjectFileMachO::SaveCore(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), CommunicationKDP::SendRequestHostInfo(), lldb_private::process_linux::NativeProcessLinux::Syscall(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObject::ValueObject(), and UnwindAssemblyInstEmulation::WriteMemory().
const char * ArchSpec::GetArchitectureName | ( | ) | const |
Returns a static string representing the current architecture.
Definition at line 539 of file ArchSpec.cpp.
References FindCoreDefinition(), and lldb_private::CoreDefinition::name.
Referenced by lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), lldb_private::TargetList::CreateTargetInternal(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::CommandObjectDisassemble::DoExecute(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), ObjectContainerUniversalMachO::Dump(), ObjectContainerBSDArchive::Dump(), lldb_private::wasm::ObjectFileWasm::Dump(), ObjectFilePECOFF::Dump(), ObjectFileELF::Dump(), DumpModuleArchitecture(), DumpModuleSections(), lldb_private::Disassembler::FindPlugin(), lldb_private::FormatEntity::Format(), lldb_private::DynamicLoaderDarwin::ImageInfo::GetArchitecture(), lldb::SBDebugger::GetDefaultArchitecture(), lldb_private::Module::GetDescription(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), ObjectFileELF::GetModuleSpecifications(), lldb_private::ModuleList::GetSharedModule(), lldb_private::Symbols::LocateExecutableObjectFile(), LocateExecutableSymbolFileDsym(), lldb_private::ModuleList::LogUUIDAndPaths(), lldb_private::Module::Module(), lldb_private::RemoteAwarePlatform::ResolveExecutable(), lldb_private::PlatformAppleSimulator::ResolveExecutable(), lldb_private::EmulateInstructionARM::SetArchitecture(), lldb_private::Target::SetArchitecture(), lldb_private::Target::SetDefaultArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::Target::Target(), and lldb_private::Module::~Module().
lldb::ByteOrder ArchSpec::GetByteOrder | ( | ) | const |
Returns the byte order for the architecture specification.
Definition at line 731 of file ArchSpec.cpp.
References lldb::eByteOrderInvalid.
Referenced by ConvertPDBLocationToDWARFExpression(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::Disassembler::DisassembleBytes(), CommandObjectMemoryRead::DoExecute(), CommandObjectMemoryWrite::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::Type::DumpValueInMemory(), lldb_private::breakpad::ObjectFileBreakpad::GetByteOrder(), lldb_private::wasm::ObjectFileWasm::GetByteOrder(), lldb_private::NativeProcessProtocol::GetByteOrder(), lldb_private::EmulateInstruction::GetByteOrder(), lldb_private::Process::GetByteOrder(), GetByteOrderAndAddrSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::Value::GetValueAsData(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_P(), IsEqualTo(), MakeLocationExpressionInternal(), lldb_private::Disassembler::ParseInstructions(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), lldb_private::Target::ReadScalarIntegerFromMemory(), lldb_private::breakpad::SymbolFileBreakpad::SaveAsDWARF(), ObjectFileMachO::SaveCore(), CommunicationKDP::SendRequestHostInfo(), lldb_private::DynamicRegisterInfo::SetRegisterInfo(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObject::ValueObject(), and UnwindAssemblyInstEmulation::WriteMemory().
std::string ArchSpec::GetClangTargetCPU | ( | ) | const |
Returns a string representing current architecture as a target CPU for tools like compiler, disassembler etc.
Definition at line 584 of file ArchSpec.cpp.
References string().
Referenced by lldb_private::ClangExpressionParser::ClangExpressionParser().
uint32_t ArchSpec::GetCodeByteSize | ( | ) | const |
Architecture code byte width accessor.
Definition at line 664 of file ArchSpec.cpp.
Referenced by GetTargetByteSize().
|
inline |
Definition at line 434 of file ArchSpec.h.
References m_core.
Referenced by lldb_private::PlatformDarwin::ARMGetSupportedArchitectures(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), DisassemblerLLVMC::DisassemblerLLVMC(), ProcessMachCore::DoLoadCore(), EmulateInstructionMIPS::EmulateInstructionMIPS(), EmulateInstructionMIPS64::EmulateInstructionMIPS64(), lldb_private::FuncUnwinders::GetDebugFrameAugmentedUnwindPlan(), lldb_private::FuncUnwinders::GetEHFrameAugmentedUnwindPlan(), RegisterContextFreeBSD_mips64::GetRegisterInfo(), lldb_private::PlatformMacOSX::GetSharedModule(), ELFLinuxPrStatus::GetSize(), ELFLinuxSigInfo::GetSize(), ELFLinuxPrPsInfo::GetSize(), lldb_private::PlatformRemoteAppleWatch::GetSupportedArchitectures(), lldb_private::PlatformRemoteAppleTV::GetSupportedArchitectures(), ABIMacOSX_arm::IsArmv7kProcess(), IsEqualTo(), MergeFrom(), lldb_private::operator<(), lldb_private::operator==(), lldb_private::PlatformAppleSimulator::ResolveExecutable(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), and lldb_private::PlatformDarwin::x86GetSupportedArchitectures().
uint32_t ArchSpec::GetDataByteSize | ( | ) | const |
Architecture data byte width accessor.
Definition at line 660 of file ArchSpec.cpp.
Referenced by ConvertPDBLocationToDWARFExpression(), CommandObjectMemoryRead::DoExecute(), GetTargetByteSize(), and MakeLocationExpressionInternal().
ByteOrder ArchSpec::GetDefaultEndian | ( | ) | const |
Returns the default endianness of the architecture.
Definition at line 698 of file ArchSpec.cpp.
References lldb_private::CoreDefinition::default_byte_order, lldb::eByteOrderInvalid, and FindCoreDefinition().
ConstString ArchSpec::GetDistributionId | ( | ) | const |
Returns the distribution id of the architecture.
This will be something like "ubuntu", "fedora", etc. on Linux.
Definition at line 676 of file ArchSpec.cpp.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo().
|
inline |
Definition at line 525 of file ArchSpec.h.
References m_flags.
Referenced by DisassemblerLLVMC::DisassemblerLLVMC(), EmulateInstructionMIPS::EmulateInstructionMIPS(), EmulateInstructionMIPS64::EmulateInstructionMIPS64(), lldb_private::ClangExpressionParser::GetClangTargetABI(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ObjectFileELF::GetSectionHeaderInfo(), ABISysV_arm::IsArmHardFloat(), and MergeFrom().
llvm::Triple::ArchType ArchSpec::GetMachine | ( | ) | const |
Returns a machine family for the current architecture.
Definition at line 668 of file ArchSpec.cpp.
References FindCoreDefinition(), and lldb_private::CoreDefinition::machine.
Referenced by lldb_private::ClangExpressionParser::ClangExpressionParser(), ConvertPDBLocationToDWARFExpression(), lldb_private::ArchitectureAArch64::Create(), lldb_private::ArchitectureArm::Create(), lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), UnwindAssembly_x86::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), ThreadFreeBSDKernel::CreateRegisterContextForFrame(), lldb_private::minidump::ThreadMinidump::CreateRegisterContextForFrame(), lldb_private::TargetThreadWindows::CreateRegisterContextForFrame(), ThreadElfCore::CreateRegisterContextForFrame(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), InstructionLLVMC::Decode(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::NativeThreadWindows::DoResume(), lldb_private::TargetThreadWindows::DoResume(), lldb_private::Address::Dump(), lldb_private::DynamicRegisterInfo::Finalize(), lldb_private::StopInfoMachException::GetDescription(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::process_gdb_remote::GetFallbackRegisters(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), RegisterContextFreeBSD_i386::GetRegisterInfo(), RegisterContextLinux_i386::GetRegisterInfo(), RegisterContextNetBSD_i386::GetRegisterInfo(), RegisterContextOpenBSD_i386::GetRegisterInfo(), RegisterContextFreeBSD_powerpc64::GetRegisterInfo(), GetRegisterInfoCount(), GetRegisterInfoPtr(), ObjectFileELF::GetSectionHeaderInfo(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::ClangExpressionSourceCode::GetText(), GetUserRegisterInfoCount(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), lldb_private::x86AssemblyInspectionEngine::Initialize(), lldb_private::RenderScriptRuntime::LoadRuntimeHooks(), lldb_private::npdb::MakeVFrameRelLocationExpression(), ProcessElfCore::parseFreeBSDNotes(), ObjectFileELF::ParseSymbols(), ObjectFileELF::ParseSymtab(), PrivateGetRegisterCount(), PrivateGetRegisterInfoPtr(), PrivateGetUserRegisterCount(), RegisterContextCorePOSIX_mips64::ReadRegister(), RegisterContextPOSIX_s390x::RegisterContextPOSIX_s390x(), RegisterContextPOSIX_x86::RegisterContextPOSIX_x86(), RegisterContextWindows_i386::RegisterContextWindows_i386(), RegisterContextWindows_x86_64::RegisterContextWindows_x86_64(), RegisterInfoPOSIX_arm64::RegisterInfoPOSIX_arm64(), ObjectFileMinidump::SaveCore(), ObjectFileMachO::SaveCore(), lldb_private::NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping(), lldb_private::process_linux::NativeProcessLinux::SupportHardwareSingleStepping(), DisassemblerLLVMC::SymbolLookup(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues().
uint32_t ArchSpec::GetMachOCPUSubType | ( | ) | const |
Definition at line 648 of file ArchSpec.cpp.
References lldb_private::CoreDefinition::core, FindArchDefinitionEntry(), FindCoreDefinition(), g_macho_arch_def, LLDB_INVALID_CPUTYPE, and ArchDefinitionEntry::sub.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), LaunchProcessPosixSpawn(), and ObjectFileMachO::SaveCore().
uint32_t ArchSpec::GetMachOCPUType | ( | ) | const |
Definition at line 636 of file ArchSpec.cpp.
References lldb_private::CoreDefinition::core, ArchDefinitionEntry::cpu, FindArchDefinitionEntry(), FindCoreDefinition(), g_macho_arch_def, and LLDB_INVALID_CPUTYPE.
Referenced by ThreadMachCore::CalculateStopInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), LaunchProcessPosixSpawn(), LaunchProcessXPC(), and ObjectFileMachO::SaveCore().
uint32_t ArchSpec::GetMaximumOpcodeByteSize | ( | ) | const |
Definition at line 924 of file ArchSpec.cpp.
References FindCoreDefinition(), and lldb_private::CoreDefinition::max_opcode_byte_size.
Referenced by CalculateDisass(), InstructionLLVMC::Decode(), OptionGroupReadMemory::FinalizeSettings(), lldb_private::StackFrame::GuessValueForAddress(), lldb_private::x86AssemblyInspectionEngine::instruction_length(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), and lldb_private::Disassembler::ParseInstructions().
uint32_t ArchSpec::GetMinimumOpcodeByteSize | ( | ) | const |
Definition at line 917 of file ArchSpec.cpp.
References FindCoreDefinition(), and lldb_private::CoreDefinition::min_opcode_byte_size.
Referenced by InstructionLLVMC::Decode().
std::string ArchSpec::GetTargetABI | ( | ) | const |
Return a string representing target application ABI.
Definition at line 548 of file ArchSpec.cpp.
References string().
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), and ELFLinuxPrStatus::GetSize().
|
inline |
Architecture triple accessor.
Definition at line 455 of file ArchSpec.h.
References m_triple.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), BuildProcessSection(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml(), ProcessKDP::CanDebug(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), lldb_private::ClangExpressionParser::ClangExpressionParser(), lldb_private::Process::CompleteAttach(), lldb_private::HostInfoAndroid::ComputeHostArchitectureSupport(), lldb_private::HostInfoLinux::ComputeHostArchitectureSupport(), lldb_private::HostInfoMacOSX::ComputeHostArchitectureSupport(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ConnectRemote(), lldb_private::ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell(), RegisterContextCorePOSIX_arm64::Create(), lldb_private::UnixSignals::Create(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::ArchitecturePPC64::Create(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::wasm::DynamicLoaderWasmDYLD::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::EmulateInstructionPPC64::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), EmulateInstructionARM64::CreateInstance(), DisassemblerLLVMC::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), EmulateInstructionMIPS64::CreateInstance(), EmulateInstructionMIPS::CreateInstance(), DynamicLoaderDarwinKernel::CreateInstance(), SystemRuntimeMacOSX::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderMacOSXDYLD::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), ABIWindows_x86_64::CreateInstance(), ABISysV_mips::CreateInstance(), lldb_private::EmulateInstructionARM::CreateInstance(), ABISysV_s390x::CreateInstance(), ABIMacOSX_arm::CreateInstance(), ABISysV_arm::CreateInstance(), ABIMacOSX_arm64::CreateInstance(), ABIMacOSX_i386::CreateInstance(), lldb_private::StructuredDataDarwinLog::CreateInstance(), ABISysV_x86_64::CreateInstance(), ABISysV_arm64::CreateInstance(), ABISysV_ppc::CreateInstance(), ABISysV_ppc64::CreateInstance(), ABISysV_hexagon::CreateInstance(), ABISysV_arc::CreateInstance(), ABISysV_i386::CreateInstance(), ABISysV_mips64::CreateInstance(), lldb_private::TypeSystemClang::CreateInstance(), lldb_private::OptionGroupPlatform::CreatePlatformWithOptions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::minidump::ThreadMinidump::CreateRegisterContextForFrame(), ThreadElfCore::CreateRegisterContextForFrame(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::DecodeProcessInfoResponse(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::Disassembler::Disassembler(), DisassemblerLLVMC::DisassemblerLLVMC(), lldb_private::Platform::DoConnectProcess(), CommandObjectProcessAttach::DoExecute(), ObjectFileMachO::Dump(), EmulateInstructionMIPS::EmulateInstructionMIPS(), EmulateInstructionMIPS64::EmulateInstructionMIPS64(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), lldb_private::DynamicRegisterInfo::Finalize(), lldb_private::Disassembler::FindPluginForTarget(), lldb_private::PlatformAppleSimulator::FindProcesses(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FindProcesses(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), DisassemblerLLVMC::FlavorValidForArchSpec(), lldb_private::FormatEntity::Format(), ObjectFileMachO::GetAllArchSpecs(), lldb_private::Platform::GetAugmentedArchSpec(), lldb_private::Module::GetCacheKey(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb::SBDebugger::GetDefaultArchitecture(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), ProcessKDP::GetHostArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), GetMacOSXProcessArgs(), lldb_private::platform_freebsd::PlatformFreeBSD::GetMmapArgumentList(), GetModuleConfig(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModuleInfo(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetModuleSpec(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetModuleSpec(), ObjectFilePECOFF::GetModuleSpecifications(), ObjectFileELF::GetModuleSpecifications(), lldb_private::AppleObjCRuntime::GetObjCVersion(), RegisterContextPOSIX_mips64::GetRegisterSet(), RegisterContextPOSIX_mips64::GetRegisterSetCount(), ObjectFileELF::GetSectionHeaderInfo(), lldb_private::Thread::GetSiginfoValue(), lldb_private::Platform::GetStatus(), lldb_private::PlatformMacOSX::GetSupportedArchitectures(), lldb::SBPlatform::GetTriple(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetWatchpointsTriggerAfterInstruction(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), lldb_private::Module::Hash(), IsEqualTo(), isLoadBiasIncorrect(), lldb_private::PosixPlatformCommandOptionValidator::IsValid(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchGDBServer(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), lldb_private::Symbols::LocateExecutableSymbolFile(), lldb_private::ABI::MakeMCRegisterInfo(), lldb_private::Module::MergeArchitecture(), lldb_private::Target::MergeArchitecture(), MergeFrom(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), ObjectFileELF::ParseARMAttributes(), lldb_private::ParseMachCPUDashSubtypeTriple(), ParseModuleSpec(), PiecewiseTripleCompare(), lldb_private::platform_freebsd::PlatformFreeBSD::PlatformFreeBSD(), lldb_private::platform_linux::PlatformLinux::PlatformLinux(), lldb_private::platform_netbsd::PlatformNetBSD::PlatformNetBSD(), DYLDRendezvous::ReadSOEntryFromMemory(), lldb_private::AssertFrameRecognizer::RecognizeFrame(), ObjectFileELF::RefineModuleDetailsFromNote(), lldb_private::minidump::ProcessMinidump::RefreshStateAfterStop(), lldb_private::RegisterAssertFrameRecognizer(), RegisterContextCorePOSIX_mips64::RegisterContextCorePOSIX_mips64(), RegisterContextCorePOSIX_powerpc::RegisterContextCorePOSIX_powerpc(), RegisterContextCorePOSIX_ppc64le::RegisterContextCorePOSIX_ppc64le(), RegisterContextCorePOSIX_s390x::RegisterContextCorePOSIX_s390x(), RegisterContextCorePOSIX_x86_64::RegisterContextCorePOSIX_x86_64(), lldb_private::DebuggerStats::ReportStatistics(), lldb_private::RemoteAwarePlatform::ResolveExecutable(), ObjectFileMinidump::SaveCore(), ObjectFileMachO::SaveCore(), lldb_private::Target::SetArchitecture(), lldb_private::Target::SetDefaultArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::EmulateInstructionPPC64::SetTargetTriple(), EmulateInstructionARM64::SetTargetTriple(), EmulateInstructionMIPS64::SetTargetTriple(), EmulateInstructionMIPS::SetTargetTriple(), lldb_private::EmulateInstructionARM::SetTargetTriple(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), lldb_private::NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping(), DYLDRendezvous::SOEntryIsMainExecutable(), lldb_private::Target::Target(), lldb_private::EmulateInstructionARM::TestEmulation(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::DynamicLoaderDarwin::UseDYLDSPI(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes(), and lldb_private::x86AssemblyInspectionEngine::x86AssemblyInspectionEngine().
|
inline |
Architecture triple accessor.
Definition at line 460 of file ArchSpec.h.
References m_triple.
bool ArchSpec::IsAlwaysThumbInstructions | ( | ) | const |
Detect whether this architecture uses thumb code exclusively.
Some embedded ARM chips (e.g. the ARM Cortex M0-7 line) can only execute the Thumb instructions, never Arm. We should normally pick up arm/thumbness from their the processor status bits (cpsr/xpsr) or hints on each function - but when doing bare-boards low level debugging (especially common with these embedded processors), we may not have those things easily accessible.
Definition at line 1440 of file ArchSpec.cpp.
References string().
Referenced by lldb_private::Disassembler::Disassembler(), DisassemblerLLVMC::DisassemblerLLVMC(), ObjectFileMachO::ParseSymtab(), and lldb_private::EmulateInstructionARM::TestEmulation().
bool ArchSpec::IsCompatibleMatch | ( | const ArchSpec & | rhs | ) | const |
Compare an ArchSpec to another ArchSpec, requiring a compatible cpu type match between them.
e.g. armv7s is compatible with armv7 - this method would return true
Definition at line 935 of file ArchSpec.cpp.
Referenced by lldb_private::ProcessInstanceInfoMatch::ArchitectureMatches(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), FileAtPathContainsArchAndUUID(), lldb_private::DynamicLoaderDarwin::ImageInfo::GetArchitecture(), ObjectContainerUniversalMachO::GetObjectFile(), lldb_private::Platform::IsCompatibleArchitecture(), lldb_private::Module::MatchesModuleSpec(), lldb_private::Module::MergeArchitecture(), lldb_private::Target::MergeArchitecture(), ObjectFileMachO::ParseHeader(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), lldb_private::BreakpointLocationList::RemoveInvalidLocations(), lldb_private::Target::SetArchitecture(), and lldb_private::Module::SetArchitecture().
|
protected |
Definition at line 970 of file ArchSpec.cpp.
References cores_match(), GetByteOrder(), GetCore(), GetTriple(), IsCompatibleEnvironment(), TripleOSWasSpecified(), and TripleVendorWasSpecified().
bool ArchSpec::IsExactMatch | ( | const ArchSpec & | rhs | ) | const |
Compare an ArchSpec to another ArchSpec, requiring an exact cpu type match between them.
e.g. armv7s is not an exact match with armv7 - this would return false
Definition at line 931 of file ArchSpec.cpp.
Referenced by lldb_private::Process::CompleteAttach(), CommandObjectProcessAttach::DoExecute(), ObjectContainerUniversalMachO::GetObjectFile(), lldb_private::Platform::IsCompatibleArchitecture(), and lldb_private::PlatformDarwin::x86GetSupportedArchitectures().
bool ArchSpec::IsFullySpecifiedTriple | ( | ) | const |
Definition at line 1408 of file ArchSpec.cpp.
bool ArchSpec::IsMIPS | ( | ) | const |
if MIPS architecture return true.
Definition at line 546 of file ArchSpec.cpp.
Referenced by lldb_private::ArchitectureMips::Create(), DisassemblerLLVMC::DisassemblerLLVMC(), ProcessElfCore::GetArchitecture(), lldb_private::ClangExpressionParser::GetClangTargetABI(), lldb_private::platform_linux::PlatformLinux::GetMmapArgumentList(), ObjectFileELF::GetSectionHeaderInfo(), ELFLinuxPrStatus::GetSize(), ELFLinuxSigInfo::GetSize(), ELFLinuxPrPsInfo::GetSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), ELFLinuxPrPsInfo::Parse(), ObjectFileELF::ParseSymbols(), DYLDRendezvous::ReadSOEntryFromMemory(), ObjectFileELF::RefineModuleDetailsFromNote(), lldb_private::NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping(), lldb_private::process_freebsd::NativeProcessFreeBSD::SupportHardwareSingleStepping(), and lldb_private::process_linux::NativeProcessLinux::SupportHardwareSingleStepping().
|
inline |
Tests if this ArchSpec is valid.
Definition at line 353 of file ArchSpec.h.
References eCore_arm_generic, kNumCores, and m_core.
Referenced by lldb_private::ProcessInstanceInfoMatch::ArchitectureMatches(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::ClangExpressionParser::ClangExpressionParser(), lldb_private::Process::CompleteAttach(), lldb_private::HostInfoAndroid::ComputeHostArchitectureSupport(), lldb_private::HostInfoLinux::ComputeHostArchitectureSupport(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), lldb_private::TypeSystemClang::CreateInstance(), lldb_private::OptionGroupPlatform::CreatePlatformWithOptions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::TargetList::CreateTargetInternal(), lldb::SBDebugger::CreateTargetWithFileAndArch(), lldb_private::Debugger::Debugger(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::Platform::DoConnectProcess(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), lldb_private::CommandObjectDisassemble::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), ProcessMachCore::DoLoadCore(), lldb_private::ProcessInstanceInfo::Dump(), lldb_private::ModuleSpec::Dump(), lldb_private::ProcessInstanceInfo::DumpAsTableRow(), DumpTargetInfo(), ObjectContainerBSDArchive::Archive::FindCachedArchive(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FindProcesses(), lldb_private::FormatEntity::Format(), lldb_private::OptionGroupArchitecture::GetArchitecture(), lldb_private::minidump::MinidumpParser::GetArchitecture(), lldb_private::ModuleSpec::GetArchitecturePtr(), lldb_private::Platform::GetAugmentedArchSpec(), lldb::SBDebugger::GetDefaultArchitecture(), lldb_private::Module::GetDescription(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(), ObjectContainerBSDArchive::GetModuleSpecifications(), ObjectFileELF::GetModuleSpecifications(), ObjectContainerUniversalMachO::GetObjectFile(), lldb_private::PlatformList::GetOrCreate(), lldb_private::Platform::GetRemoteSharedModule(), lldb_private::ModuleList::GetSharedModule(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetStatus(), lldb_private::Platform::GetSystemArchitecture(), lldb::SBPlatform::GetTriple(), lldb_private::Platform::IsCompatibleArchitecture(), lldb::SBTarget::Launch(), lldb_private::Target::Launch(), lldb_private::ProcessInstanceInfoMatch::MatchAllProcesses(), lldb_private::Module::MatchesModuleSpec(), lldb_private::Module::MergeArchitecture(), lldb_private::Target::MergeArchitecture(), lldb_private::Module::Module(), lldb_private::ModuleSpec::operator bool(), operator bool(), ObjectFileMachO::ParseHeader(), ObjectFileELF::ParseSymbols(), lldb_private::BreakpointLocationList::RemoveInvalidLocations(), lldb_private::RemoteAwarePlatform::ResolveExecutable(), lldb_private::PlatformRemoteDarwinDevice::ResolveExecutable(), lldb_private::PlatformAppleSimulator::ResolveExecutable(), lldb_private::Platform::ResolveExecutable(), lldb_private::Platform::ResolveRemoteExecutable(), lldb_private::Target::SetArchitecture(), lldb_private::Module::SetArchitecture(), lldb::SBDebugger::SetDefaultArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::Platform::SetSystemArchitecture(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), shouldSkipSimulatorPlatform(), lldb_private::Target::Target(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
|
static |
Definition at line 257 of file ArchSpec.cpp.
References g_core_definitions, list(), and lldb_private::CoreDefinition::name.
Referenced by arch_helper().
void ArchSpec::MergeFrom | ( | const ArchSpec & | other | ) |
Merges fields from another ArchSpec into this ArchSpec.
This will use the supplied ArchSpec to fill in any fields of the triple in this ArchSpec which were unspecified. This can be used to refine a generic ArchSpec with a more specific one. For example, if this ArchSpec's triple is something like i386-unknown-unknown-unknown, and we have a triple which is x64-pc-windows-msvc, then merging that triple into this one will result in the triple i386-pc-windows-msvc.
Definition at line 802 of file ArchSpec.cpp.
References GetCore(), GetFlags(), GetTriple(), TripleEnvironmentWasSpecified(), TripleOSWasSpecified(), and TripleVendorWasSpecified().
Referenced by ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), ProcessElfCore::GetArchitecture(), lldb_private::DynamicLoaderDarwin::ImageInfo::GetArchitecture(), lldb_private::Module::GetMemoryObjectFile(), lldb_private::Module::GetObjectFile(), lldb_private::Module::MergeArchitecture(), lldb_private::Target::MergeArchitecture(), and lldb_private::Target::SetArchitecture().
|
inlineexplicit |
Definition at line 356 of file ArchSpec.h.
References IsValid().
void ArchSpec::PiecewiseTripleCompare | ( | const ArchSpec & | other, |
bool & | arch_different, | ||
bool & | vendor_different, | ||
bool & | os_different, | ||
bool & | os_version_different, | ||
bool & | env_different | ||
) | const |
Definition at line 1423 of file ArchSpec.cpp.
References GetTriple().
Referenced by lldb_private::Target::SetArchitecture().
bool ArchSpec::SetArchitecture | ( | ArchitectureType | arch_type, |
uint32_t | cpu, | ||
uint32_t | sub, | ||
uint32_t | os = 0 |
||
) |
Change the architecture object type, CPU type and OS type.
[in] | arch_type | The object type of this ArchSpec. |
[in] | cpu | The required CPU type. |
[in] | os | The optional OS type The default value of 0 was chosen to from the ELF spec value ELFOSABI_NONE. ELF is the only one using this parameter. If another format uses this parameter and 0 does not work, use a value over 255 because in the ELF header this is value is only a byte. |
As a side effect, the vendor value is usually set to unknown. The exceptions are aarch64-apple-ios arm-apple-ios thumb-apple-ios x86-apple- x86_64-apple-
As a side effect, the os value is usually set to unknown The exceptions are --aix aarch64-apple-ios arm-apple-ios thumb-apple-ios powerpc-apple-darwin --freebsd --linux --netbsd --openbsd --solaris
Definition at line 844 of file ArchSpec.cpp.
References lldb_private::CoreDefinition::core, ArchDefinitionEntry::core, lldb_private::eArchTypeCOFF, lldb_private::eArchTypeELF, lldb_private::eArchTypeMachO, FindArchDefinition(), FindArchDefinitionEntry(), FindCoreDefinition(), lldb_private::GetLog(), LLDB_LOGF, lldb_private::CoreDefinition::machine, and lldb_private::CoreDefinition::name.
Referenced by lldb_private::HostInfoMacOSX::ComputeHostArchitectureSupport(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::DecodeProcessInfoResponse(), ObjectFileMachO::GetAllArchSpecs(), lldb_private::ObjectFilePDB::GetArchitecture(), ObjectFilePECOFF::GetArchitecture(), ObjectContainerUniversalMachO::GetArchitectureAtIndex(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), ProcessKDP::GetHostArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), GetMacOSXProcessCPUType(), ObjectFileELF::GetModuleSpecifications(), ObjectFileELF::GetSectionHeaderInfo(), lldb_private::ParseMachCPUDashSubtypeTriple(), and CommunicationKDP::SendRequestHostInfo().
|
inline |
Sets this ArchSpec's byte order.
In the common case there is no need to call this method as the byte order can almost always be determined by the architecture. However, many CPU's are bi-endian (ARM, Alpha, PowerPC, etc) and the default/assumed byte order may be incorrect.
Definition at line 428 of file ArchSpec.h.
References m_byte_order.
void ArchSpec::SetDistributionId | ( | const char * | distribution_id | ) |
Set the distribution id of the architecture.
This will be something like "ubuntu", "fedora", etc. on Linux. This should be the same value returned by HostInfo::GetDistributionId ().
Definition at line 680 of file ArchSpec.cpp.
References lldb_private::ConstString::SetCString().
Referenced by lldb_private::HostInfoLinux::ComputeHostArchitectureSupport(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo().
void ArchSpec::SetFlags | ( | const std::string & | elf_abi | ) |
Definition at line 570 of file ArchSpec.cpp.
|
inline |
Definition at line 527 of file ArchSpec.h.
References m_flags.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), ObjectFileELF::GetSectionHeaderInfo(), and ObjectFileELF::ParseARMAttributes().
bool ArchSpec::SetTriple | ( | const llvm::Triple & | triple | ) |
Architecture triple setter.
Configures this ArchSpec according to the given triple. If the triple has unknown components in all of the vendor, OS, and the optional environment field (i.e. "i386-unknown-unknown") then default values are taken from the host. Architecture and environment components are used to further resolve the CPU type and subtype, endian characteristics, etc.
Definition at line 740 of file ArchSpec.cpp.
Referenced by lldb_private::HostInfoBase::ComputeHostArchitectureSupport(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::DecodeProcessInfoResponse(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::Disassembler::Disassembler(), lldb_private::minidump::MinidumpParser::GetArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModuleInfo(), lldb_private::ObjectFilePDB::GetModuleSpecifications(), ObjectFilePECOFF::GetModuleSpecifications(), ObjectContainerUniversalMachO::GetObjectFile(), ParseModuleSpec(), and lldb_private::Instruction::TestEmulation().
bool ArchSpec::SetTriple | ( | llvm::StringRef | triple_str | ) |
Definition at line 782 of file ArchSpec.cpp.
References lldb_private::ParseMachCPUDashSubtypeTriple().
|
inline |
Definition at line 364 of file ArchSpec.h.
References m_triple.
Referenced by lldb_private::platform_android::PlatformAndroid::CreateInstance(), MergeFrom(), and shouldSkipSimulatorPlatform().
|
inline |
Definition at line 362 of file ArchSpec.h.
References m_triple.
Referenced by lldb_private::platform_gdb_server::PlatformRemoteGDBServer::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), ObjectFileELF::GetArchitecture(), IsEqualTo(), and MergeFrom().
|
inline |
Definition at line 358 of file ArchSpec.h.
References m_triple.
Referenced by lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), IsEqualTo(), and MergeFrom().
|
protected |
Definition at line 1048 of file ArchSpec.cpp.
References lldb_private::CoreDefinition::core, lldb_private::CoreDefinition::default_byte_order, and FindCoreDefinition().
|
protected |
Definition at line 537 of file ArchSpec.h.
Referenced by SetByteOrder().
|
protected |
Definition at line 536 of file ArchSpec.h.
|
protected |
Definition at line 543 of file ArchSpec.h.
|
protected |
Definition at line 541 of file ArchSpec.h.
Referenced by GetFlags(), and SetFlags().
|
protected |
Definition at line 535 of file ArchSpec.h.
Referenced by GetTriple(), TripleEnvironmentWasSpecified(), TripleOSWasSpecified(), and TripleVendorWasSpecified().