LLDB  mainline
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lldb_private::ArchSpec Class Reference

An architecture specification class. More...

#include "lldb/Utility/ArchSpec.h"

Collaboration diagram for lldb_private::ArchSpec:
Collaboration graph
[legend]

Public Types

enum  MIPSSubType {
  eMIPSSubType_unknown, eMIPSSubType_mips32, eMIPSSubType_mips32r2, eMIPSSubType_mips32r6,
  eMIPSSubType_mips32el, eMIPSSubType_mips32r2el, eMIPSSubType_mips32r6el, eMIPSSubType_mips64,
  eMIPSSubType_mips64r2, eMIPSSubType_mips64r6, eMIPSSubType_mips64el, eMIPSSubType_mips64r2el,
  eMIPSSubType_mips64r6el
}
 
enum  MIPSASE {
  eMIPSAse_dsp = 0x00000001, eMIPSAse_dspr2 = 0x00000002, eMIPSAse_eva = 0x00000004, eMIPSAse_mcu = 0x00000008,
  eMIPSAse_mdmx = 0x00000010, eMIPSAse_mips3d = 0x00000020, eMIPSAse_mt = 0x00000040, eMIPSAse_smartmips = 0x00000080,
  eMIPSAse_virt = 0x00000100, eMIPSAse_msa = 0x00000200, eMIPSAse_mips16 = 0x00000400, eMIPSAse_micromips = 0x00000800,
  eMIPSAse_xpa = 0x00001000, eMIPSAse_mask = 0x00001fff, eMIPSABI_O32 = 0x00002000, eMIPSABI_N32 = 0x00004000,
  eMIPSABI_N64 = 0x00008000, eMIPSABI_O64 = 0x00020000, eMIPSABI_EABI32 = 0x00040000, eMIPSABI_EABI64 = 0x00080000,
  eMIPSABI_mask = 0x000ff000
}
 
enum  MIPS_ABI_FP {
  eMIPS_ABI_FP_ANY = 0x00000000, eMIPS_ABI_FP_DOUBLE = 0x00100000, eMIPS_ABI_FP_SINGLE = 0x00200000, eMIPS_ABI_FP_SOFT = 0x00300000,
  eMIPS_ABI_FP_OLD_64 = 0x00400000, eMIPS_ABI_FP_XX = 0x00500000, eMIPS_ABI_FP_64 = 0x00600000, eMIPS_ABI_FP_64A = 0x00700000,
  eMIPS_ABI_FP_mask = 0x00700000
}
 
enum  ARMeflags { eARM_abi_soft_float = 0x00000200, eARM_abi_hard_float = 0x00000400 }
 
enum  Core {
  eCore_arm_generic, eCore_arm_armv4, eCore_arm_armv4t, eCore_arm_armv5,
  eCore_arm_armv5e, eCore_arm_armv5t, eCore_arm_armv6, eCore_arm_armv6m,
  eCore_arm_armv7, eCore_arm_armv7f, eCore_arm_armv7s, eCore_arm_armv7k,
  eCore_arm_armv7m, eCore_arm_armv7em, eCore_arm_xscale, eCore_thumb,
  eCore_thumbv4t, eCore_thumbv5, eCore_thumbv5e, eCore_thumbv6,
  eCore_thumbv6m, eCore_thumbv7, eCore_thumbv7s, eCore_thumbv7k,
  eCore_thumbv7f, eCore_thumbv7m, eCore_thumbv7em, eCore_arm_arm64,
  eCore_arm_armv8, eCore_arm_aarch64, eCore_mips32, eCore_mips32r2,
  eCore_mips32r3, eCore_mips32r5, eCore_mips32r6, eCore_mips32el,
  eCore_mips32r2el, eCore_mips32r3el, eCore_mips32r5el, eCore_mips32r6el,
  eCore_mips64, eCore_mips64r2, eCore_mips64r3, eCore_mips64r5,
  eCore_mips64r6, eCore_mips64el, eCore_mips64r2el, eCore_mips64r3el,
  eCore_mips64r5el, eCore_mips64r6el, eCore_ppc_generic, eCore_ppc_ppc601,
  eCore_ppc_ppc602, eCore_ppc_ppc603, eCore_ppc_ppc603e, eCore_ppc_ppc603ev,
  eCore_ppc_ppc604, eCore_ppc_ppc604e, eCore_ppc_ppc620, eCore_ppc_ppc750,
  eCore_ppc_ppc7400, eCore_ppc_ppc7450, eCore_ppc_ppc970, eCore_ppc64le_generic,
  eCore_ppc64_generic, eCore_ppc64_ppc970_64, eCore_s390x_generic, eCore_sparc_generic,
  eCore_sparc9_generic, eCore_x86_32_i386, eCore_x86_32_i486, eCore_x86_32_i486sx,
  eCore_x86_32_i686, eCore_x86_64_x86_64, eCore_x86_64_x86_64h, eCore_hexagon_generic,
  eCore_hexagon_hexagonv4, eCore_hexagon_hexagonv5, eCore_uknownMach32, eCore_uknownMach64,
  kNumCores, kCore_invalid, kCore_any, kCore_arm_any,
  kCore_ppc_any, kCore_ppc64_any, kCore_x86_32_any, kCore_x86_64_any,
  kCore_hexagon_any, kCore_arm_first = eCore_arm_generic, kCore_arm_last = eCore_arm_xscale, kCore_thumb_first = eCore_thumb,
  kCore_thumb_last = eCore_thumbv7em, kCore_ppc_first = eCore_ppc_generic, kCore_ppc_last = eCore_ppc_ppc970, kCore_ppc64_first = eCore_ppc64_generic,
  kCore_ppc64_last = eCore_ppc64_ppc970_64, kCore_x86_32_first = eCore_x86_32_i386, kCore_x86_32_last = eCore_x86_32_i686, kCore_x86_64_first = eCore_x86_64_x86_64,
  kCore_x86_64_last = eCore_x86_64_x86_64h, kCore_hexagon_first = eCore_hexagon_generic, kCore_hexagon_last = eCore_hexagon_hexagonv5, kCore_mips32_first = eCore_mips32,
  kCore_mips32_last = eCore_mips32r6, kCore_mips32el_first = eCore_mips32el, kCore_mips32el_last = eCore_mips32r6el, kCore_mips64_first = eCore_mips64,
  kCore_mips64_last = eCore_mips64r6, kCore_mips64el_first = eCore_mips64el, kCore_mips64el_last = eCore_mips64r6el, kCore_mips_first = eCore_mips32,
  kCore_mips_last = eCore_mips64r6el
}
 

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 ArchSpecoperator= (const ArchSpec &rhs)
 Assignment operator. 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 (Stream &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 (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 size_t 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
 

Detailed Description

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 32 of file ArchSpec.h.

Member Enumeration Documentation

◆ ARMeflags

Enumerator
eARM_abi_soft_float 
eARM_abi_hard_float 

Definition at line 89 of file ArchSpec.h.

◆ Core

Enumerator
eCore_arm_generic 
eCore_arm_armv4 
eCore_arm_armv4t 
eCore_arm_armv5 
eCore_arm_armv5e 
eCore_arm_armv5t 
eCore_arm_armv6 
eCore_arm_armv6m 
eCore_arm_armv7 
eCore_arm_armv7f 
eCore_arm_armv7s 
eCore_arm_armv7k 
eCore_arm_armv7m 
eCore_arm_armv7em 
eCore_arm_xscale 
eCore_thumb 
eCore_thumbv4t 
eCore_thumbv5 
eCore_thumbv5e 
eCore_thumbv6 
eCore_thumbv6m 
eCore_thumbv7 
eCore_thumbv7s 
eCore_thumbv7k 
eCore_thumbv7f 
eCore_thumbv7m 
eCore_thumbv7em 
eCore_arm_arm64 
eCore_arm_armv8 
eCore_arm_aarch64 
eCore_mips32 
eCore_mips32r2 
eCore_mips32r3 
eCore_mips32r5 
eCore_mips32r6 
eCore_mips32el 
eCore_mips32r2el 
eCore_mips32r3el 
eCore_mips32r5el 
eCore_mips32r6el 
eCore_mips64 
eCore_mips64r2 
eCore_mips64r3 
eCore_mips64r5 
eCore_mips64r6 
eCore_mips64el 
eCore_mips64r2el 
eCore_mips64r3el 
eCore_mips64r5el 
eCore_mips64r6el 
eCore_ppc_generic 
eCore_ppc_ppc601 
eCore_ppc_ppc602 
eCore_ppc_ppc603 
eCore_ppc_ppc603e 
eCore_ppc_ppc603ev 
eCore_ppc_ppc604 
eCore_ppc_ppc604e 
eCore_ppc_ppc620 
eCore_ppc_ppc750 
eCore_ppc_ppc7400 
eCore_ppc_ppc7450 
eCore_ppc_ppc970 
eCore_ppc64le_generic 
eCore_ppc64_generic 
eCore_ppc64_ppc970_64 
eCore_s390x_generic 
eCore_sparc_generic 
eCore_sparc9_generic 
eCore_x86_32_i386 
eCore_x86_32_i486 
eCore_x86_32_i486sx 
eCore_x86_32_i686 
eCore_x86_64_x86_64 
eCore_x86_64_x86_64h 
eCore_hexagon_generic 
eCore_hexagon_hexagonv4 
eCore_hexagon_hexagonv5 
eCore_uknownMach32 
eCore_uknownMach64 
kNumCores 
kCore_invalid 
kCore_any 
kCore_arm_any 
kCore_ppc_any 
kCore_ppc64_any 
kCore_x86_32_any 
kCore_x86_64_any 
kCore_hexagon_any 
kCore_arm_first 
kCore_arm_last 
kCore_thumb_first 
kCore_thumb_last 
kCore_ppc_first 
kCore_ppc_last 
kCore_ppc64_first 
kCore_ppc64_last 
kCore_x86_32_first 
kCore_x86_32_last 
kCore_x86_64_first 
kCore_x86_64_last 
kCore_hexagon_first 
kCore_hexagon_last 
kCore_mips32_first 
kCore_mips32_last 
kCore_mips32el_first 
kCore_mips32el_last 
kCore_mips64_first 
kCore_mips64_last 
kCore_mips64el_first 
kCore_mips64el_last 
kCore_mips_first 
kCore_mips_last 

Definition at line 94 of file ArchSpec.h.

◆ MIPS_ABI_FP

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 76 of file ArchSpec.h.

◆ MIPSASE

Enumerator
eMIPSAse_dsp 
eMIPSAse_dspr2 
eMIPSAse_eva 
eMIPSAse_mcu 
eMIPSAse_mdmx 
eMIPSAse_mips3d 
eMIPSAse_mt 
eMIPSAse_smartmips 
eMIPSAse_virt 
eMIPSAse_msa 
eMIPSAse_mips16 
eMIPSAse_micromips 
eMIPSAse_xpa 
eMIPSAse_mask 
eMIPSABI_O32 
eMIPSABI_N32 
eMIPSABI_N64 
eMIPSABI_O64 
eMIPSABI_EABI32 
eMIPSABI_EABI64 
eMIPSABI_mask 

Definition at line 51 of file ArchSpec.h.

◆ MIPSSubType

Enumerator
eMIPSSubType_unknown 
eMIPSSubType_mips32 
eMIPSSubType_mips32r2 
eMIPSSubType_mips32r6 
eMIPSSubType_mips32el 
eMIPSSubType_mips32r2el 
eMIPSSubType_mips32r6el 
eMIPSSubType_mips64 
eMIPSSubType_mips64r2 
eMIPSSubType_mips64r6 
eMIPSSubType_mips64el 
eMIPSSubType_mips64r2el 
eMIPSSubType_mips64r6el 

Definition at line 34 of file ArchSpec.h.

Constructor & Destructor Documentation

◆ ArchSpec() [1/5]

ArchSpec::ArchSpec ( )

Default constructor.

Default constructor that initializes the object with invalid cpu type and subtype values.

Definition at line 549 of file ArchSpec.cpp.

◆ ArchSpec() [2/5]

ArchSpec::ArchSpec ( const llvm::Triple &  triple)
explicit

Constructor over triple.

Constructs an ArchSpec with properties consistent with the given Triple.

Definition at line 558 of file ArchSpec.cpp.

◆ ArchSpec() [3/5]

ArchSpec::ArchSpec ( const char *  triple_cstr)
explicit

Definition at line 551 of file ArchSpec.cpp.

◆ ArchSpec() [4/5]

ArchSpec::ArchSpec ( llvm::StringRef  triple_str)
explicit

Definition at line 556 of file ArchSpec.cpp.

◆ ArchSpec() [5/5]

ArchSpec::ArchSpec ( ArchitectureType  arch_type,
uint32_t  cpu_type,
uint32_t  cpu_subtype 
)
explicit

Constructor over architecture name.

Constructs an ArchSpec with properties consistent with the given object type and architecture name.

Definition at line 560 of file ArchSpec.cpp.

◆ ~ArchSpec()

ArchSpec::~ArchSpec ( )
default

Destructor.

Member Function Documentation

◆ AutoComplete()

size_t ArchSpec::AutoComplete ( CompletionRequest request)
static

◆ CharIsSignedByDefault()

bool ArchSpec::CharIsSignedByDefault ( ) const

Returns true if 'char' is a signed type by default in the architecture false otherwise.

Returns
True if 'char' is a signed type by default on the architecture and false otherwise.

Definition at line 763 of file ArchSpec.cpp.

Referenced by GetTriple(), and ParseLangArgs().

◆ Clear()

void ArchSpec::Clear ( )

◆ ContainsOnlyArch()

bool ArchSpec::ContainsOnlyArch ( const llvm::Triple &  normalized_triple)
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 852 of file ArchSpec.cpp.

Referenced by lldb_private::Platform::GetAugmentedArchSpec().

◆ CoreUpdated()

void ArchSpec::CoreUpdated ( bool  update_triple)
protected

◆ DumpTriple()

void ArchSpec::DumpTriple ( Stream s) const

◆ GetAddressByteSize()

uint32_t ArchSpec::GetAddressByteSize ( ) const

Returns the size in bytes of an address of the current architecture.

Returns
The byte size of an address of the current architecture.

Definition at line 742 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(), OperatingSystemPython::CreateRegisterContextForThread(), lldb_private::Disassembler::DisassembleBytes(), CommandObjectMemoryRead::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectWatchpointSetExpression::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), UnwindMacOSXFrameBackchain::DoGetFrameCount(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::AddressRange::Dump(), lldb_private::Address::Dump(), lldb_private::StackFrame::Dump(), DumpAddress(), CommandObjectSourceInfo::DumpLinesInFunctions(), OptionGroupReadMemory::FinalizeSettings(), lldb_private::IRExecutionUnit::FreeNow(), lldb_private::breakpad::ObjectFileBreakpad::GetAddressByteSize(), lldb_private::EmulateInstruction::GetAddressByteSize(), lldb_private::Process::GetAddressByteSize(), GetByteOrderAndAddrSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), UnwindAssemblyInstEmulation::GetPluginDescriptionStatic(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), 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(), lldb_private::npdb::MakeVFrameRelLocationExpression(), DynamicLoaderMacOS::NotifyBreakpointHit(), CommandObjectTargetModulesList::PrintModule(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), lldb_private::Target::ReadPointerFromMemory(), lldb_private::Target::ReadScalarIntegerFromMemory(), lldb_private::HostInfoAndroid::ResolveLibraryPath(), ObjectFileMachO::SaveCore(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), CommunicationKDP::SendRequestHostInfo(), lldb_private::RegisterContext::UpdateDynamicRegisterSize(), updateSectionLoadAddress(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and lldb_private::ValueObjectDynamicValue::UpdateValue().

◆ GetArchitectureName()

const char * ArchSpec::GetArchitectureName ( ) const

Returns a static string representing the current architecture.

Returns
A static string corresponding to the current architecture.

Definition at line 591 of file ArchSpec.cpp.

References FindCoreDefinition(), and lldb_private::CoreDefinition::name.

Referenced by PlatformAppleTVSimulator::CreateInstance(), PlatformAppleWatchSimulator::CreateInstance(), PlatformMacOSX::CreateInstance(), PlatformiOSSimulator::CreateInstance(), PlatformRemoteiOS::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), lldb_private::platform_netbsd::PlatformNetBSD::CreateInstance(), lldb_private::platform_openbsd::PlatformOpenBSD::CreateInstance(), lldb_private::platform_linux::PlatformLinux::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), lldb_private::platform_freebsd::PlatformFreeBSD::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::CommandObjectDisassemble::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), ObjectContainerUniversalMachO::Dump(), ObjectContainerBSDArchive::Dump(), ObjectFilePECOFF::Dump(), ObjectFileELF::Dump(), DumpModuleArchitecture(), DumpModuleSections(), lldb_private::Disassembler::FindPlugin(), lldb_private::FormatEntity::Format(), lldb::SBDebugger::GetDefaultArchitecture(), lldb_private::Module::GetDescription(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), ObjectFileELF::GetModuleSpecifications(), lldb_private::ModuleList::GetSharedModule(), lldb_private::Target::GetStaticBroadcasterClass(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Launch(), lldb_private::process_linux::NativeProcessLinux::Factory::Launch(), LaunchInNewTerminalWithAppleScript(), lldb_private::Symbols::LocateExecutableObjectFile(), LocateExecutableSymbolFileDsym(), lldb_private::ModuleList::LogUUIDAndPaths(), lldb_private::Module::Module(), ObjectFileMachO::ParseSymtab(), PlatformRemoteDarwinDevice::ResolveExecutable(), PlatformPOSIX::ResolveExecutable(), lldb_private::PlatformWindows::ResolveExecutable(), PlatformAppleWatchSimulator::ResolveExecutable(), PlatformAppleTVSimulator::ResolveExecutable(), PlatformiOSSimulator::ResolveExecutable(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ResolveExecutable(), lldb_private::EmulateInstructionARM::SetArchitecture(), lldb_private::Target::SetArchitecture(), lldb_private::Target::SetDefaultArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::Module::~Module(), and lldb_private::TargetList::~TargetList().

◆ GetByteOrder()

lldb::ByteOrder ArchSpec::GetByteOrder ( ) const

Returns the byte order for the architecture specification.

Returns
The endian enumeration for the current endianness of the architecture specification

Definition at line 788 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::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(), UnwindAssemblyInstEmulation::GetPluginDescriptionStatic(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::Value::GetValueAsData(), IsEqualTo(), MakeLocationExpressionInternal(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), lldb_private::Target::ReadScalarIntegerFromMemory(), ObjectFileMachO::SaveCore(), CommunicationKDP::SendRequestHostInfo(), DynamicRegisterInfo::SetRegisterInfo(), TripleEnvironmentWasSpecified(), lldb_private::RegisterContext::UpdateDynamicRegisterSize(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and lldb_private::ValueObjectDynamicValue::UpdateValue().

◆ GetClangTargetCPU()

std::string ArchSpec::GetClangTargetCPU ( ) const

Returns a string representing current architecture as a target CPU for tools like compiler, disassembler etc.

Returns
A string representing target CPU for the current architecture.

Definition at line 640 of file ArchSpec.cpp.

Referenced by lldb_private::ClangExpressionParser::ClangExpressionParser().

◆ GetCodeByteSize()

uint32_t ArchSpec::GetCodeByteSize ( ) const

Architecture code byte width accessor.

Returns
the size in 8-bit (host) bytes of a minimum addressable unit from the Architecture's code bus

Definition at line 722 of file ArchSpec.cpp.

Referenced by GetCore(), and GetTargetByteSize().

◆ GetCore()

Core lldb_private::ArchSpec::GetCore ( ) const
inline

◆ GetDataByteSize()

uint32_t ArchSpec::GetDataByteSize ( ) const

Architecture data byte width accessor.

Returns
the size in 8-bit (host) bytes of a minimum addressable unit from the Architecture's data bus

Definition at line 718 of file ArchSpec.cpp.

Referenced by ConvertPDBLocationToDWARFExpression(), CommandObjectMemoryRead::DoExecute(), GetCore(), GetTargetByteSize(), and MakeLocationExpressionInternal().

◆ GetDefaultEndian()

ByteOrder ArchSpec::GetDefaultEndian ( ) const

Returns the default endianness of the architecture.

Returns
The endian enumeration for the default endianness of the architecture.

Definition at line 756 of file ArchSpec.cpp.

References lldb_private::CoreDefinition::default_byte_order, lldb::eByteOrderInvalid, and FindCoreDefinition().

Referenced by GetTriple().

◆ GetDistributionId()

ConstString ArchSpec::GetDistributionId ( ) const

Returns the distribution id of the architecture.

This will be something like "ubuntu", "fedora", etc. on Linux.

Returns
A ConstString ref containing the distribution id, potentially empty.

Definition at line 734 of file ArchSpec.cpp.

Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo().

◆ GetFlags()

uint32_t lldb_private::ArchSpec::GetFlags ( ) const
inline

◆ GetMachine()

llvm::Triple::ArchType ArchSpec::GetMachine ( ) const

Returns a machine family for the current architecture.

Returns
An LLVM arch type.

Definition at line 726 of file ArchSpec.cpp.

References FindCoreDefinition(), and lldb_private::CoreDefinition::machine.

Referenced by lldb_private::ClangExpressionParser::ClangExpressionParser(), ConvertPDBLocationToDWARFExpression(), PlatformAppleTVSimulator::CreateInstance(), PlatformAppleWatchSimulator::CreateInstance(), PlatformiOSSimulator::CreateInstance(), PlatformRemoteiOS::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), UnwindAssembly_x86::CreateInstance(), 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::Address::Dump(), DynamicRegisterInfo::Finalize(), ObjectFileELF::GetBaseAddress(), lldb_private::StopInfoMachException::GetDescription(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), FreeBSDThread::GetRegisterContext(), FreeBSDThread::GetRegisterIndexFromOffset(), RegisterContextFreeBSD_i386::GetRegisterInfo(), RegisterContextLinux_i386::GetRegisterInfo(), RegisterContextOpenBSD_i386::GetRegisterInfo(), RegisterContextLinux_mips::GetRegisterInfo(), RegisterContextFreeBSD_powerpc64::GetRegisterInfo(), GetRegisterInfoCount(), GetRegisterInfoPtr(), FreeBSDThread::GetRegisterName(), RegisterContextLinux_mips::GetRegisterSet(), RegisterContextPOSIX_mips64::GetRegisterSet(), RegisterContextPOSIX_mips64::GetRegisterSetCount(), PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode(), ProcessFreeBSD::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::Thread::GetUnwinder(), GetUserRegisterInfoCount(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetWatchpointsTriggerAfterInstruction(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), lldb_private::x86AssemblyInspectionEngine::Initialize(), lldb_private::RenderScriptRuntime::LoadRuntimeHooks(), lldb_private::npdb::MakeVFrameRelLocationExpression(), ParseFreeBSDPrStatus(), ParseOpenBSDProcInfo(), PrivateGetRegisterCount(), PrivateGetRegisterInfoPtr(), RegisterContextCorePOSIX_mips64::ReadRegister(), DYLDRendezvous::ReadSOEntryFromMemory(), RegisterContextPOSIX_arm::RegisterContextPOSIX_arm(), RegisterContextPOSIX_arm64::RegisterContextPOSIX_arm64(), RegisterContextPOSIX_s390x::RegisterContextPOSIX_s390x(), RegisterContextPOSIX_x86::RegisterContextPOSIX_x86(), ObjectFileMachO::SaveCore(), ProcessFreeBSD::SupportHardwareSingleStepping(), lldb_private::ArchitecturePPC64::Terminate(), lldb_private::ArchitectureArm::Terminate(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), and lldb_private::x86AssemblyInspectionEngine::~x86AssemblyInspectionEngine().

◆ GetMachOCPUSubType()

uint32_t ArchSpec::GetMachOCPUSubType ( ) const

◆ GetMachOCPUType()

uint32_t ArchSpec::GetMachOCPUType ( ) const

◆ GetMaximumOpcodeByteSize()

uint32_t ArchSpec::GetMaximumOpcodeByteSize ( ) const

◆ GetMinimumOpcodeByteSize()

uint32_t ArchSpec::GetMinimumOpcodeByteSize ( ) const

◆ GetTargetABI()

std::string ArchSpec::GetTargetABI ( ) const

Return a string representing target application ABI.

Returns
A string representing target application ABI.

Definition at line 604 of file ArchSpec.cpp.

Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), and ELFLinuxPrStatus::GetSize().

◆ GetTriple() [1/2]

llvm::Triple& lldb_private::ArchSpec::GetTriple ( )
inline

Architecture triple accessor.

Returns
A triple describing this ArchSpec.

Definition at line 431 of file ArchSpec.h.

References m_triple.

Referenced by lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), ProcessKDP::CanDebug(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), lldb_private::ClangExpressionParser::ClangExpressionParser(), lldb_private::Process::CompleteAttach(), lldb_private::HostInfoAndroid::ComputeHostArchitectureSupport(), lldb_private::HostInfoMacOSX::ComputeHostArchitectureSupport(), lldb_private::HostInfoLinux::ComputeHostArchitectureSupport(), lldb_private::Platform::ConnectProcess(), lldb_private::ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell(), lldb_private::UnixSignals::Create(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), PlatformAppleTVSimulator::CreateInstance(), PlatformAppleWatchSimulator::CreateInstance(), PlatformMacOSX::CreateInstance(), PlatformiOSSimulator::CreateInstance(), PlatformRemoteiOS::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformWindows::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), lldb_private::platform_freebsd::PlatformFreeBSD::CreateInstance(), lldb_private::platform_linux::PlatformLinux::CreateInstance(), lldb_private::platform_netbsd::PlatformNetBSD::CreateInstance(), lldb_private::platform_openbsd::PlatformOpenBSD::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::EmulateInstructionPPC64::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), EmulateInstructionARM64::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), DynamicLoaderStatic::CreateInstance(), DisassemblerLLVMC::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), EmulateInstructionMIPS64::CreateInstance(), DynamicLoaderDarwinKernel::CreateInstance(), EmulateInstructionMIPS::CreateInstance(), SystemRuntimeMacOSX::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderMacOSXDYLD::CreateInstance(), lldb_private::ClangASTContext::CreateInstance(), ABISysV_mips::CreateInstance(), lldb_private::EmulateInstructionARM::CreateInstance(), ABISysV_s390x::CreateInstance(), ABISysV_arm::CreateInstance(), ABIMacOSX_arm::CreateInstance(), ABIMacOSX_arm64::CreateInstance(), ABIMacOSX_i386::CreateInstance(), ABISysV_ppc::CreateInstance(), ABISysV_arm64::CreateInstance(), ABISysV_ppc64::CreateInstance(), ABISysV_hexagon::CreateInstance(), ABISysV_x86_64::CreateInstance(), ABISysV_mips64::CreateInstance(), ABISysV_i386::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(), CommandObjectProcessAttach::DoExecute(), ObjectFileMachO::Dump(), EmulateInstructionMIPS::EmulateInstructionMIPS(), EmulateInstructionMIPS64::EmulateInstructionMIPS64(), DynamicRegisterInfo::Finalize(), lldb_private::Disassembler::FindPluginForTarget(), PlatformAppleTVSimulator::FindProcesses(), PlatformAppleWatchSimulator::FindProcesses(), PlatformiOSSimulator::FindProcesses(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FindProcesses(), DisassemblerLLVMC::FlavorValidForArchSpec(), ObjectFileMachO::GetArchitecture(), lldb_private::Platform::GetAugmentedArchSpec(), ObjectFileELF::GetBaseAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb::SBDebugger::GetDefaultArchitecture(), ProcessKDP::GetHostArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), lldb_private::InstructionList::GetIndexOfNextBranchInstruction(), GetMacOSXProcessArgs(), lldb_private::platform_freebsd::PlatformFreeBSD::GetMmapArgumentList(), lldb_private::platform_linux::PlatformLinux::GetMmapArgumentList(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModuleInfo(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetModuleSpec(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetModuleSpec(), ObjectFileELF::GetModuleSpecifications(), lldb_private::minidump::MinidumpParser::GetModuleUUID(), lldb_private::AppleObjCRuntime::GetObjCVersion(), FreeBSDThread::GetRegisterContext(), RegisterContextPOSIX_mips64::GetRegisterSet(), RegisterContextPOSIX_mips64::GetRegisterSetCount(), lldb_private::Target::GetStaticBroadcasterClass(), lldb_private::Platform::GetStatus(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_openbsd::PlatformOpenBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_linux::PlatformLinux::GetSupportedArchitectureAtIndex(), lldb_private::platform_netbsd::PlatformNetBSD::GetSupportedArchitectureAtIndex(), PlatformAppleWatchSimulator::GetSupportedArchitectureAtIndex(), PlatformAppleTVSimulator::GetSupportedArchitectureAtIndex(), PlatformiOSSimulator::GetSupportedArchitectureAtIndex(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(), lldb_private::Thread::GetUnwinder(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), IsEqualTo(), isLoadBiasIncorrect(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchGDBServer(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), lldb_private::Target::MergeArchitecture(), MergeFrom(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), lldb_private::ParseMachCPUDashSubtypeTriple(), ParseModuleSpec(), PiecewiseTripleCompare(), DYLDRendezvous::ReadSOEntryFromMemory(), lldb_private::minidump::ProcessMinidump::RefreshStateAfterStop(), RegisterContextCorePOSIX_mips64::RegisterContextCorePOSIX_mips64(), RegisterContextCorePOSIX_powerpc::RegisterContextCorePOSIX_powerpc(), RegisterContextCorePOSIX_ppc64le::RegisterContextCorePOSIX_ppc64le(), RegisterContextCorePOSIX_s390x::RegisterContextCorePOSIX_s390x(), RegisterContextCorePOSIX_x86_64::RegisterContextCorePOSIX_x86_64(), PlatformPOSIX::ResolveExecutable(), ObjectFileMachO::SaveCore(), lldb_private::ClangASTContext::SetArchitecture(), 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(), DYLDRendezvous::SOEntryIsMainExecutable(), lldb_private::ArchitecturePPC64::Terminate(), lldb_private::EmulateInstructionARM::TestEmulation(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::DynamicLoaderDarwin::UseDYLDSPI(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::x86AssemblyInspectionEngine::x86AssemblyInspectionEngine(), lldb_private::StructuredDataDarwinLog::~StructuredDataDarwinLog(), and lldb_private::TargetList::~TargetList().

◆ GetTriple() [2/2]

const llvm::Triple& lldb_private::ArchSpec::GetTriple ( ) const
inline

◆ IsAlwaysThumbInstructions()

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.

Returns
true if this is an arm ArchSpec which can only execute Thumb instructions

Definition at line 1428 of file ArchSpec.cpp.

Referenced by lldb_private::Disassembler::Disassembler(), DisassemblerLLVMC::DisassemblerLLVMC(), GetTriple(), and lldb_private::EmulateInstructionARM::TestEmulation().

◆ IsCompatibleMatch()

bool ArchSpec::IsCompatibleMatch ( const ArchSpec rhs) const

◆ IsEqualTo()

bool ArchSpec::IsEqualTo ( const ArchSpec rhs,
bool  exact_match 
) const
protected

◆ IsExactMatch()

bool ArchSpec::IsExactMatch ( const ArchSpec rhs) const

◆ IsFullySpecifiedTriple()

bool ArchSpec::IsFullySpecifiedTriple ( ) const

Definition at line 1392 of file ArchSpec.cpp.

Referenced by GetTriple().

◆ IsMIPS()

bool ArchSpec::IsMIPS ( ) const

◆ IsValid()

bool lldb_private::ArchSpec::IsValid ( ) const
inline

Tests if this ArchSpec is valid.

Returns
True if the current architecture is valid, false otherwise.

Definition at line 329 of file ArchSpec.h.

References eCore_arm_generic, kNumCores, and m_core.

Referenced by 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::Platform::ConnectProcess(), lldb_private::Platform::Create(), PlatformAppleTVSimulator::CreateInstance(), PlatformAppleWatchSimulator::CreateInstance(), PlatformMacOSX::CreateInstance(), PlatformiOSSimulator::CreateInstance(), PlatformRemoteiOS::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformWindows::CreateInstance(), lldb_private::platform_openbsd::PlatformOpenBSD::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), lldb_private::platform_freebsd::PlatformFreeBSD::CreateInstance(), lldb_private::platform_linux::PlatformLinux::CreateInstance(), lldb_private::platform_netbsd::PlatformNetBSD::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::ClangASTContext::CreateInstance(), lldb_private::OptionGroupPlatform::CreatePlatformWithOptions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), ProcessFreeBSD::DoAttachToProcessWithID(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), lldb_private::CommandObjectDisassemble::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), 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(), ObjectFileMachO::GetArchitecture(), lldb_private::ModuleSpec::GetArchitecturePtr(), lldb_private::Platform::GetAugmentedArchSpec(), lldb_private::Platform::GetCachedExecutable(), lldb::SBDebugger::GetDefaultArchitecture(), lldb_private::Module::GetDescription(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfo(), ObjectContainerBSDArchive::GetModuleSpecifications(), ObjectFileMachO::GetModuleSpecifications(), ObjectFileELF::GetModuleSpecifications(), ObjectContainerUniversalMachO::GetObjectFile(), lldb_private::Platform::GetPlatformForArchitecture(), lldb_private::ModuleList::GetSharedModule(), lldb_private::Target::GetStaticBroadcasterClass(), lldb_private::Platform::GetStatus(), lldb_private::platform_openbsd::PlatformOpenBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_linux::PlatformLinux::GetSupportedArchitectureAtIndex(), lldb_private::platform_netbsd::PlatformNetBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectureAtIndex(), PlatformAppleTVSimulator::GetSupportedArchitectureAtIndex(), PlatformAppleWatchSimulator::GetSupportedArchitectureAtIndex(), PlatformiOSSimulator::GetSupportedArchitectureAtIndex(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(), lldb_private::Platform::GetSystemArchitecture(), lldb_private::Platform::IsCompatibleArchitecture(), lldb::SBTarget::Launch(), lldb_private::Target::Launch(), LaunchInNewTerminalWithAppleScript(), lldb_private::Module::MatchesModuleSpec(), lldb_private::Target::MergeArchitecture(), lldb_private::Module::Module(), lldb_private::ModuleSpec::operator bool(), operator bool(), ObjectFileMachO::ParseHeader(), lldb_private::BreakpointLocationList::RemoveInvalidLocations(), PlatformRemoteDarwinDevice::ResolveExecutable(), PlatformPOSIX::ResolveExecutable(), lldb_private::PlatformWindows::ResolveExecutable(), PlatformAppleTVSimulator::ResolveExecutable(), PlatformAppleWatchSimulator::ResolveExecutable(), PlatformiOSSimulator::ResolveExecutable(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ResolveExecutable(), lldb_private::Platform::ResolveExecutable(), lldb_private::Target::SetArchitecture(), lldb_private::Module::SetArchitecture(), lldb::SBDebugger::SetDefaultArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::Platform::SetSystemArchitecture(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), PlatformDarwin::x86GetSupportedArchitectureAtIndex(), and lldb_private::TargetList::~TargetList().

◆ ListSupportedArchNames()

void ArchSpec::ListSupportedArchNames ( StringList list)
static

◆ MergeFrom()

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 859 of file ArchSpec.cpp.

References GetCore(), GetFlags(), GetTriple(), TripleEnvironmentWasSpecified(), and TripleVendorWasSpecified().

Referenced by ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), ProcessElfCore::GetArchitecture(), lldb_private::Module::GetMemoryObjectFile(), lldb_private::Module::GetObjectFile(), lldb_private::Target::MergeArchitecture(), lldb_private::Target::SetArchitecture(), and TripleEnvironmentWasSpecified().

◆ operator bool()

lldb_private::ArchSpec::operator bool ( ) const
inlineexplicit

Definition at line 332 of file ArchSpec.h.

References IsValid().

◆ operator=()

const ArchSpec & ArchSpec::operator= ( const ArchSpec rhs)

Assignment operator.

Parameters
[in]rhsanother ArchSpec object to copy.
Returns
A const reference to this object.

Definition at line 569 of file ArchSpec.cpp.

References m_byte_order, m_core, m_distribution_id, m_flags, and m_triple.

◆ PiecewiseTripleCompare()

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 1411 of file ArchSpec.cpp.

References GetTriple().

Referenced by GetTriple(), and lldb_private::Target::SetArchitecture().

◆ 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.

Parameters
[in]arch_typeThe object type of this ArchSpec.
[in]cpuThe required CPU type.
[in]osThe 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.
Returns
True if the object, and CPU were successfully set.

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 892 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::GetLogIfAnyCategoriesSet(), LIBLLDB_LOG_PLATFORM, LIBLLDB_LOG_PROCESS, LIBLLDB_LOG_TARGET, lldb_private::CoreDefinition::machine, lldb_private::CoreDefinition::name, and lldb_private::Log::Printf().

Referenced by lldb_private::HostInfoMacOSX::ComputeHostArchitectureSupport(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::DecodeProcessInfoResponse(), ObjectFilePECOFF::GetArchitecture(), ObjectFileMachO::GetArchitecture(), ObjectContainerUniversalMachO::GetArchitectureAtIndex(), ObjectFileELF::GetBaseAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), ProcessKDP::GetHostArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), GetMacOSXProcessCPUType(), ObjectFileELF::GetModuleSpecifications(), lldb_private::ParseMachCPUDashSubtypeTriple(), CommunicationKDP::SendRequestHostInfo(), and TripleEnvironmentWasSpecified().

◆ SetByteOrder()

void lldb_private::ArchSpec::SetByteOrder ( lldb::ByteOrder  byte_order)
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 404 of file ArchSpec.h.

References GetMaximumOpcodeByteSize(), GetMinimumOpcodeByteSize(), and m_byte_order.

◆ SetDistributionId()

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 738 of file ArchSpec.cpp.

References lldb_private::ConstString::SetCString().

Referenced by lldb_private::HostInfoLinux::ComputeHostArchitectureSupport(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo().

◆ SetFlags() [1/2]

void lldb_private::ArchSpec::SetFlags ( uint32_t  flags)
inline

◆ SetFlags() [2/2]

void ArchSpec::SetFlags ( std::string  elf_abi)

Definition at line 626 of file ArchSpec.cpp.

◆ SetTriple() [1/2]

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.

Returns
A triple describing this ArchSpec.

Definition at line 797 of file ArchSpec.cpp.

Referenced by PlatformDarwin::ARMGetSupportedArchitectureAtIndex(), 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::GetGDBServerRegisterInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModuleInfo(), ObjectFilePECOFF::GetModuleSpecifications(), GetModuleSpecInfoFromUUIDDictionary(), ObjectContainerUniversalMachO::GetObjectFile(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_netbsd::PlatformNetBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_openbsd::PlatformOpenBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_linux::PlatformLinux::GetSupportedArchitectureAtIndex(), PlatformRemoteAppleBridge::GetSupportedArchitectureAtIndex(), PlatformRemoteAppleTV::GetSupportedArchitectureAtIndex(), PlatformRemoteAppleWatch::GetSupportedArchitectureAtIndex(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(), GetTriple(), ParseModuleSpec(), lldb_private::Instruction::TestEmulation(), and PlatformDarwin::x86GetSupportedArchitectureAtIndex().

◆ SetTriple() [2/2]

bool ArchSpec::SetTriple ( llvm::StringRef  triple_str)

Definition at line 839 of file ArchSpec.cpp.

References lldb_private::ParseMachCPUDashSubtypeTriple().

◆ TripleEnvironmentWasSpecified()

bool lldb_private::ArchSpec::TripleEnvironmentWasSpecified ( ) const
inline

◆ TripleOSWasSpecified()

bool lldb_private::ArchSpec::TripleOSWasSpecified ( ) const
inline

◆ TripleVendorWasSpecified()

bool lldb_private::ArchSpec::TripleVendorWasSpecified ( ) const
inline

◆ UpdateCore()

void ArchSpec::UpdateCore ( )
protected

Definition at line 1067 of file ArchSpec.cpp.

References FindCoreDefinition().

Referenced by SetFlags().

Member Data Documentation

◆ m_byte_order

lldb::ByteOrder lldb_private::ArchSpec::m_byte_order = lldb::eByteOrderInvalid
protected

Definition at line 513 of file ArchSpec.h.

Referenced by operator=(), and SetByteOrder().

◆ m_core

Core lldb_private::ArchSpec::m_core = kCore_invalid
protected

Definition at line 512 of file ArchSpec.h.

Referenced by GetCore(), IsValid(), and operator=().

◆ m_distribution_id

ConstString lldb_private::ArchSpec::m_distribution_id
protected

Definition at line 519 of file ArchSpec.h.

Referenced by operator=().

◆ m_flags

uint32_t lldb_private::ArchSpec::m_flags = 0
protected

Definition at line 517 of file ArchSpec.h.

Referenced by GetFlags(), operator=(), and SetFlags().

◆ m_triple

llvm::Triple lldb_private::ArchSpec::m_triple
protected

The documentation for this class was generated from the following files: