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

#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  RISCVSubType { eRISCVSubType_unknown, eRISCVSubType_riscv32, eRISCVSubType_riscv64 }
 
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_armv7l, 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_armv8l, eCore_arm_arm64e,
  eCore_arm_arm64_32, 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_riscv32, eCore_riscv64,
  eCore_uknownMach32, eCore_uknownMach64, eCore_arc, eCore_avr,
  eCore_wasm32, 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 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
 

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

Member Enumeration Documentation

◆ ARMeflags

Enumerator
eARM_abi_soft_float 
eARM_abi_hard_float 

Definition at line 90 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_armv7l 
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_armv8l 
eCore_arm_arm64e 
eCore_arm_arm64_32 
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_riscv32 
eCore_riscv64 
eCore_uknownMach32 
eCore_uknownMach64 
eCore_arc 
eCore_avr 
eCore_wasm32 
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 101 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 77 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 52 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 35 of file ArchSpec.h.

◆ RISCVSubType

Enumerator
eRISCVSubType_unknown 
eRISCVSubType_riscv32 
eRISCVSubType_riscv64 

Definition at line 95 of file ArchSpec.h.

Constructor & Destructor Documentation

◆ ArchSpec() [1/5]

ArchSpec::ArchSpec ( )
default

Default constructor.

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

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

◆ ArchSpec() [3/5]

ArchSpec::ArchSpec ( const char *  triple_cstr)
explicit

Definition at line 512 of file ArchSpec.cpp.

◆ ArchSpec() [4/5]

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

Definition at line 517 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 521 of file ArchSpec.cpp.

◆ ~ArchSpec()

ArchSpec::~ArchSpec ( )
default

Destructor.

Member Function Documentation

◆ AutoComplete()

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

Referenced by lldb_private::ClangExpressionParser::ClangExpressionParser(), 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 794 of file ArchSpec.cpp.

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

◆ CoreUpdated()

void ArchSpec::CoreUpdated ( bool  update_triple)
protected

◆ DumpTriple()

void ArchSpec::DumpTriple ( llvm::raw_ostream &  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 683 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::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(), 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::RegisterContext::UpdateDynamicRegisterSize(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObject::ValueObject(), and UnwindAssemblyInstEmulation::WriteMemory().

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

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

Referenced by PlatformRemoteiOS::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), PlatformRemoteMacOSX::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), PlatformAppleSimulator::CreateInstance(), lldb_private::TargetList::CreateTargetInternal(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::CommandObjectDisassemble::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), 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(), ObjectFileMachO::ParseSymtab(), lldb_private::RemoteAwarePlatform::ResolveExecutable(), PlatformRemoteDarwinDevice::ResolveExecutable(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ResolveExecutable(), 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().

◆ 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 730 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(), DynamicRegisterInfo::SetRegisterInfo(), lldb_private::RegisterContext::UpdateDynamicRegisterSize(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObject::ValueObject(), and UnwindAssemblyInstEmulation::WriteMemory().

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

References string().

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

Referenced by 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 659 of file ArchSpec.cpp.

Referenced by ConvertPDBLocationToDWARFExpression(), CommandObjectMemoryRead::DoExecute(), 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 697 of file ArchSpec.cpp.

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

◆ 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 675 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 667 of file ArchSpec.cpp.

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

Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::ClangExpressionParser::ClangExpressionParser(), ConvertPDBLocationToDWARFExpression(), lldb_private::ArchitectureAArch64::Create(), lldb_private::ArchitectureArm::Create(), PlatformRemoteiOS::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), PlatformAppleSimulator::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::NativeThreadWindows::DoResume(), lldb_private::TargetThreadWindows::DoResume(), lldb_private::Address::Dump(), DynamicRegisterInfo::Finalize(), lldb_private::StopInfoMachException::GetDescription(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), 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(), PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), ObjectFileELF::GetSymtab(), 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(), 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().

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

References string().

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

References m_triple.

Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::TraceSessionSaver::BuildProcessesSection(), 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::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(), PlatformRemoteiOS::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), PlatformRemoteMacOSX::CreateInstance(), lldb_private::PlatformWindows::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), lldb_private::wasm::DynamicLoaderWasmDYLD::CreateInstance(), lldb_private::EmulateInstructionPPC64::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), JITLoaderGDB::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), EmulateInstructionARM64::CreateInstance(), PlatformAppleSimulator::CreateInstance(), DisassemblerLLVMC::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), EmulateInstructionMIPS64::CreateInstance(), DynamicLoaderDarwinKernel::CreateInstance(), EmulateInstructionMIPS::CreateInstance(), SystemRuntimeMacOSX::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderMacOSXDYLD::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(), DynamicRegisterInfo::Finalize(), lldb_private::Disassembler::FindPluginForTarget(), 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::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb::SBDebugger::GetDefaultArchitecture(), ProcessKDP::GetHostArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), GetMacOSXProcessArgs(), lldb_private::platform_freebsd::PlatformFreeBSD::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::AppleObjCRuntime::GetObjCVersion(), RegisterContextPOSIX_mips64::GetRegisterSet(), RegisterContextPOSIX_mips64::GetRegisterSetCount(), ObjectFileELF::GetSectionHeaderInfo(), lldb_private::Platform::GetStatus(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_netbsd::PlatformNetBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_linux::PlatformLinux::GetSupportedArchitectureAtIndex(), lldb_private::platform_openbsd::PlatformOpenBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(), 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(), IsEqualTo(), isLoadBiasIncorrect(), lldb_private::PosixPlatformCommandOptionValidator::IsValid(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchGDBServer(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), 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(), 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::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().

◆ GetTriple() [2/2]

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

Architecture triple accessor.

Returns
A triple describing this ArchSpec.

Definition at line 449 of file ArchSpec.h.

References m_triple.

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

References string().

Referenced by lldb_private::Disassembler::Disassembler(), DisassemblerLLVMC::DisassemblerLLVMC(), ObjectFileMachO::ParseSymtab(), 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

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

Returns
true if the two ArchSpecs match.

Definition at line 930 of file ArchSpec.cpp.

Referenced by lldb_private::Process::CompleteAttach(), CommandObjectProcessAttach::DoExecute(), ObjectContainerUniversalMachO::GetObjectFile(), lldb_private::Platform::IsCompatibleArchitecture(), and PlatformDarwin::x86GetSupportedArchitectureAtIndex().

◆ IsFullySpecifiedTriple()

bool ArchSpec::IsFullySpecifiedTriple ( ) const

Definition at line 1397 of file ArchSpec.cpp.

◆ 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 342 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::Platform::Create(), PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformWindows::CreateInstance(), PlatformRemoteAppleBridge::CreateInstance(), PlatformRemoteAppleTV::CreateInstance(), PlatformRemoteMacOSX::CreateInstance(), PlatformRemoteAppleWatch::CreateInstance(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), 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::Platform::GetPlatformForArchitecture(), lldb_private::Platform::GetRemoteSharedModule(), lldb_private::ModuleList::GetSharedModule(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetStatus(), lldb_private::platform_openbsd::PlatformOpenBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_linux::PlatformLinux::GetSupportedArchitectureAtIndex(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_netbsd::PlatformNetBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(), 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(), PlatformRemoteDarwinDevice::ResolveExecutable(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ResolveExecutable(), PlatformAppleSimulator::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::ProcessGDBRemote::SetThreadStopInfo(), shouldSkipSimulatorPlatform(), lldb_private::Target::Target(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes(), and PlatformDarwin::x86GetSupportedArchitectureAtIndex().

◆ 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 801 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().

◆ operator bool()

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

Definition at line 345 of file ArchSpec.h.

References IsValid().

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

References GetTriple().

Referenced by 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 843 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_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().

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

References 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 679 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 ArchSpec::SetFlags ( const std::string elf_abi)

Definition at line 569 of file ArchSpec.cpp.

◆ SetFlags() [2/2]

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

◆ 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 739 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::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(), lldb_private::platform_linux::PlatformLinux::GetSupportedArchitectureAtIndex(), lldb_private::platform_netbsd::PlatformNetBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_openbsd::PlatformOpenBSD::GetSupportedArchitectureAtIndex(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSupportedArchitectureAtIndex(), PlatformRemoteAppleTV::GetSupportedArchitectureAtIndex(), PlatformRemoteAppleBridge::GetSupportedArchitectureAtIndex(), PlatformRemoteMacOSX::GetSupportedArchitectureAtIndex(), PlatformRemoteAppleWatch::GetSupportedArchitectureAtIndex(), PlatformMacOSX::GetSupportedArchitectureAtIndex(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetSupportedArchitectureAtIndex(), ParseModuleSpec(), lldb_private::Instruction::TestEmulation(), and PlatformDarwin::x86GetSupportedArchitectureAtIndex().

◆ SetTriple() [2/2]

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

Definition at line 781 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

Member Data Documentation

◆ m_byte_order

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

Definition at line 526 of file ArchSpec.h.

Referenced by SetByteOrder().

◆ m_core

Core lldb_private::ArchSpec::m_core = kCore_invalid
protected

Definition at line 525 of file ArchSpec.h.

Referenced by GetCore(), and IsValid().

◆ m_distribution_id

ConstString lldb_private::ArchSpec::m_distribution_id
protected

Definition at line 532 of file ArchSpec.h.

◆ m_flags

uint32_t lldb_private::ArchSpec::m_flags = 0
protected

Definition at line 530 of file ArchSpec.h.

Referenced by GetFlags(), and SetFlags().

◆ m_triple

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

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