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"

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  RISCVeflags {
  eRISCV_rvc = 0x00000001 , eRISCV_float_abi_soft = 0x00000000 , eRISCV_float_abi_single = 0x00000002 , eRISCV_float_abi_double = 0x00000004 ,
  eRISCV_float_abi_quad = 0x00000006 , eRISCV_float_abi_mask = 0x00000006 , eRISCV_rve = 0x00000008 , eRISCV_tso = 0x00000010
}
 
enum  RISCVSubType { eRISCVSubType_unknown , eRISCVSubType_riscv32 , eRISCVSubType_riscv64 }
 
enum  LoongArchSubType { eLoongArchSubType_unknown , eLoongArchSubType_loongarch32 , eLoongArchSubType_loongarch64 }
 
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_msp430 , 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_loongarch32 , eCore_loongarch64 , 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
}
 
enum  MatchType : bool { CompatibleMatch , ExactMatch }
 

Public Member Functions

 ArchSpec ()
 Default constructor.
 
 ArchSpec (const llvm::Triple &triple)
 Constructor over triple.
 
 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.
 
 ~ArchSpec ()
 Destructor.
 
const char * GetArchitectureName () const
 Returns a static string representing the current architecture.
 
bool IsMIPS () const
 if MIPS architecture return true.
 
std::string GetClangTargetCPU () const
 Returns a string representing current architecture as a target CPU for tools like compiler, disassembler etc.
 
std::string GetTargetABI () const
 Return a string representing target application ABI.
 
void Clear ()
 Clears the object state.
 
uint32_t GetAddressByteSize () const
 Returns the size in bytes of an address of the current architecture.
 
llvm::Triple::ArchType GetMachine () const
 Returns a machine family for the current architecture.
 
bool IsValid () const
 Tests if this ArchSpec is valid.
 
 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.
 
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.
 
lldb::ByteOrder GetByteOrder () const
 Returns the byte order for the architecture specification.
 
void SetByteOrder (lldb::ByteOrder byte_order)
 Sets this ArchSpec's byte order.
 
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.
 
uint32_t GetCodeByteSize () const
 Architecture code byte width accessor.
 
llvm::Triple & GetTriple ()
 Architecture triple accessor.
 
const llvm::Triple & GetTriple () const
 Architecture triple accessor.
 
void DumpTriple (llvm::raw_ostream &s) const
 
bool SetTriple (const llvm::Triple &triple)
 Architecture triple setter.
 
bool SetTriple (llvm::StringRef triple_str)
 
lldb::ByteOrder GetDefaultEndian () const
 Returns the default endianness of the architecture.
 
bool CharIsSignedByDefault () const
 Returns true if 'char' is a signed type by default in the architecture false otherwise.
 
bool IsMatch (const ArchSpec &rhs, MatchType match) const
 Compare this ArchSpec to another ArchSpec.
 
bool IsExactMatch (const ArchSpec &rhs) const
 Shorthand for IsMatch(rhs, ExactMatch).
 
bool IsCompatibleMatch (const ArchSpec &rhs) const
 Shorthand for IsMatch(rhs, CompatibleMatch).
 
bool IsFullySpecifiedTriple () const
 
bool IsAlwaysThumbInstructions () const
 Detect whether this architecture uses thumb code exclusively.
 
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.
 
static void ListSupportedArchNames (StringList &list)
 
static void AutoComplete (CompletionRequest &request)
 

Protected Member Functions

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
 

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

Member Enumeration Documentation

◆ ARMeflags

Enumerator
eARM_abi_soft_float 
eARM_abi_hard_float 

Definition at line 88 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_msp430 
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_loongarch32 
eCore_loongarch64 
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 116 of file ArchSpec.h.

◆ LoongArchSubType

Enumerator
eLoongArchSubType_unknown 
eLoongArchSubType_loongarch32 
eLoongArchSubType_loongarch64 

Definition at line 110 of file ArchSpec.h.

◆ MatchType

Enumerator
CompatibleMatch 
ExactMatch 

Definition at line 486 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 75 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 50 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 33 of file ArchSpec.h.

◆ RISCVeflags

Enumerator
eRISCV_rvc 
eRISCV_float_abi_soft 

RVC, +c.

eRISCV_float_abi_single 

soft float

eRISCV_float_abi_double 

single precision floating point, +f

eRISCV_float_abi_quad 

double precision floating point, +d

eRISCV_float_abi_mask 

quad precision floating point, +q

eRISCV_rve 
eRISCV_tso 

RVE, +e.

Definition at line 93 of file ArchSpec.h.

◆ RISCVSubType

Enumerator
eRISCVSubType_unknown 
eRISCVSubType_riscv32 
eRISCVSubType_riscv64 

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

References SetTriple().

◆ ArchSpec() [3/5]

ArchSpec::ArchSpec ( const char *  triple_cstr)
explicit

Definition at line 527 of file ArchSpec.cpp.

References SetTriple().

◆ ArchSpec() [4/5]

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

Definition at line 532 of file ArchSpec.cpp.

References SetTriple().

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

References SetArchitecture().

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

References m_triple.

Referenced by ParseLangArgs(), and SetupLangOpts().

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

Referenced by lldb_private::HostInfoBase::GetAugmentedArchSpec(), and 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 691 of file ArchSpec.cpp.

References lldb_private::CoreDefinition::addr_byte_size, eMIPSABI_N32, eMIPSABI_O32, FindCoreDefinition(), m_core, m_flags, and lldb_private::CoreDefinition::machine.

Referenced by lldb_private::WatchpointAlgorithms::AtomizeWatchpointRequest(), ConvertPDBLocationToDWARFExpression(), CreateDWARFExpression(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::Disassembler::DisassembleBytes(), lldb_private::IRExecutionUnit::DisassembleFunction(), CommandObjectMemoryRead::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::Address::Dump(), lldb_private::AddressRange::Dump(), lldb_private::StackFrame::Dump(), DumpAddressAndContent(), CommandObjectSourceInfo::DumpLinesInFunctions(), OptionGroupReadMemory::FinalizeSettings(), lldb_private::EmulateInstruction::GetAddressByteSize(), lldb_private::NativeProcessProtocol::GetAddressByteSize(), lldb_private::Process::GetAddressByteSize(), lldb_private::breakpad::ObjectFileBreakpad::GetAddressByteSize(), ObjectFileCOFF::GetAddressByteSize(), lldb_private::ObjectFileJSON::GetAddressByteSize(), ObjectFilePlaceholder::GetAddressByteSize(), lldb_private::wasm::ObjectFileWasm::GetAddressByteSize(), GetByteOrderAndAddrSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), DynamicLoaderMacOS::GetNotificationFuncAddrFromImageInfos(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), lldb_private::Thread::GetSiginfoValue(), ELFLinuxPrStatus::GetSize(), ELFLinuxPrPsInfo::GetSize(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::Value::GetValueAsData(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), 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::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObject::ValueObject(), lldb_private::Watchpoint::Watchpoint(), 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 552 of file ArchSpec.cpp.

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

Referenced by lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformRemoteAppleXR::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), lldb_private::TargetList::CreateTargetInternal(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::CommandObjectDisassemble::DoExecute(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), ObjectFileELF::Dump(), ObjectFilePECOFF::Dump(), ObjectFileCOFF::Dump(), lldb_private::plugin::dwarf::ManualDWARFIndex::Dump(), lldb_private::wasm::ObjectFileWasm::Dump(), DumpModuleArchitecture(), DumpModuleSections(), lldb_private::OptionValueArch::DumpValue(), 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::SymbolLocatorDefault::LocateExecutableObjectFile(), lldb_private::SymbolLocatorDebugSymbols::LocateExecutableSymbolFile(), lldb_private::ModuleList::LogUUIDAndPaths(), lldb_private::Module::Module(), 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 738 of file ArchSpec.cpp.

References lldb::eByteOrderInvalid, GetDefaultEndian(), and m_byte_order.

Referenced by ConvertPDBLocationToDWARFExpression(), CreateDWARFExpression(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::Disassembler::DisassembleBytes(), CommandObjectMemoryRead::DoExecute(), CommandObjectMemoryWrite::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::EmulateInstruction::GetByteOrder(), lldb_private::NativeProcessProtocol::GetByteOrder(), lldb_private::Process::GetByteOrder(), lldb_private::breakpad::ObjectFileBreakpad::GetByteOrder(), lldb_private::ObjectFileJSON::GetByteOrder(), ObjectFilePlaceholder::GetByteOrder(), lldb_private::wasm::ObjectFileWasm::GetByteOrder(), GetByteOrderAndAddrSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::Value::GetValueAsData(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_P(), IsMatch(), MakeLocationExpressionInternal(), lldb_private::Disassembler::ParseInstructions(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), lldb_private::Target::ReadScalarIntegerFromMemory(), lldb_private::breakpad::SymbolFileBreakpad::SaveAsDWARF(), ObjectFileMachO::SaveCore(), CommunicationKDP::SendRequestHostInfo(), lldb_private::DynamicRegisterInfo::SetRegisterInfo(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::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 597 of file ArchSpec.cpp.

References eCore_mips32, eCore_mips32el, eCore_mips32r2, eCore_mips32r2el, eCore_mips32r3, eCore_mips32r3el, eCore_mips32r5, eCore_mips32r5el, eCore_mips32r6, eCore_mips32r6el, eCore_mips64, eCore_mips64el, eCore_mips64r2, eCore_mips64r2el, eCore_mips64r3, eCore_mips64r3el, eCore_mips64r5, eCore_mips64r5el, eCore_mips64r6, eCore_mips64r6el, GetTriple(), IsMIPS(), and m_core.

Referenced by SetupTargetOpts().

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

Referenced by ConvertPDBLocationToDWARFExpression(), CreateDWARFExpression(), 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 705 of file ArchSpec.cpp.

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

Referenced by GetByteOrder().

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

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

Referenced by MinidumpFileBuilder::AddThreadList(), ABISysV_riscv::CodeAddressIsValid(), ConvertPDBLocationToDWARFExpression(), lldb_private::ArchitectureAArch64::Create(), lldb_private::ArchitectureArm::Create(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformRemoteAppleXR::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), UnwindAssembly_x86::CreateInstance(), ThreadElfCore::CreateRegisterContextForFrame(), ThreadFreeBSDKernel::CreateRegisterContextForFrame(), lldb_private::minidump::ThreadMinidump::CreateRegisterContextForFrame(), lldb_private::TargetThreadWindows::CreateRegisterContextForFrame(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), InstructionLLVMC::Decode(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::TargetThreadWindows::DoResume(), lldb_private::NativeThreadWindows::DoResume(), lldb_private::Address::Dump(), lldb_private::EmulateInstructionLoongArch::EmulateInstructionLoongArch(), lldb_private::DynamicRegisterInfo::Finalize(), lldb_private::StopInfoMachException::GetDescription(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::process_gdb_remote::GetFallbackRegisters(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), GetRegisterInfoCount(), RegisterInfoPOSIX_loongarch64::GetRegisterInfoCount(), RegisterInfoPOSIX_riscv64::GetRegisterInfoCount(), GetRegisterInfoPtr(), RegisterInfoPOSIX_loongarch64::GetRegisterInfoPtr(), RegisterInfoPOSIX_riscv64::GetRegisterInfoPtr(), ABISysV_riscv::GetReturnValueObjectImpl(), ABISysV_riscv::GetReturnValueObjectSimple(), ObjectFileELF::GetSectionHeaderInfo(), GetSoftwareBreakpointSize(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::ClangExpressionSourceCode::GetText(), GetUserRegisterInfoCount(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), lldb_private::x86AssemblyInspectionEngine::Initialize(), lldb_private::npdb::MakeVFrameRelLocationExpression(), ProcessElfCore::parseFreeBSDNotes(), ObjectFileELF::ParseSymbols(), ObjectFileELF::ParseSymtab(), PrivateGetRegisterCount(), PrivateGetRegisterInfoPtr(), PrivateGetUserRegisterCount(), RegisterContextCorePOSIX_mips64::ReadRegister(), RegisterContextPOSIX_s390x::RegisterContextPOSIX_s390x(), RegisterContextWindows_i386::RegisterContextWindows_i386(), RegisterContextWindows_x86_64::RegisterContextWindows_x86_64(), RegisterInfoPOSIX_arm64::RegisterInfoPOSIX_arm64(), ObjectFileMachO::SaveCore(), SetupTargetOpts(), 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 561 of file ArchSpec.cpp.

References eMIPSABI_mask, eMIPSABI_N32, eMIPSABI_N64, eMIPSABI_O32, GetFlags(), and IsMIPS().

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

References m_triple.

Referenced by MinidumpFileBuilder::AddHeaderAndCalculateDirectories(), lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), MinidumpFileBuilder::AddThreadList(), lldb_private::AppleObjCDeclVendor::AppleObjCDeclVendor(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), BuildProcessSection(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml(), ProcessKDP::CanDebug(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::HostInfoAndroid::ComputeHostArchitectureSupport(), lldb_private::HostInfoLinux::ComputeHostArchitectureSupport(), lldb_private::HostInfoMacOSX::ComputeHostArchitectureSupport(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ConnectRemote(), lldb_private::ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell(), lldb_private::UnixSignals::Create(), lldb_private::ArchitecturePPC64::Create(), RegisterContextCorePOSIX_arm64::Create(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformRemoteAppleXR::CreateInstance(), lldb_private::EmulateInstructionPPC64::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), DisassemblerLLVMC::CreateInstance(), lldb_private::EmulateInstructionARM::CreateInstance(), EmulateInstructionARM64::CreateInstance(), EmulateInstructionMIPS::CreateInstance(), EmulateInstructionMIPS64::CreateInstance(), lldb_private::TypeSystemClang::CreateInstance(), ABIMacOSX_arm64::CreateInstance(), ABISysV_arm64::CreateInstance(), ABISysV_arc::CreateInstance(), ABIMacOSX_arm::CreateInstance(), ABISysV_arm::CreateInstance(), ABISysV_hexagon::CreateInstance(), ABISysV_mips::CreateInstance(), ABISysV_mips64::CreateInstance(), ABISysV_msp430::CreateInstance(), ABISysV_ppc::CreateInstance(), ABISysV_ppc64::CreateInstance(), ABISysV_riscv::CreateInstance(), ABISysV_s390x::CreateInstance(), ABIMacOSX_i386::CreateInstance(), ABISysV_i386::CreateInstance(), ABISysV_x86_64::CreateInstance(), ABIWindows_x86_64::CreateInstance(), SystemRuntimeMacOSX::CreateInstance(), DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderFreeBSDKernel::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderMacOSXDYLD::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), lldb_private::StructuredDataDarwinLog::CreateInstance(), lldb_private::wasm::DynamicLoaderWasmDYLD::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::GNUstepObjCRuntime::CreateInstance(), lldb_private::OptionGroupPlatform::CreatePlatformWithOptions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), ThreadElfCore::CreateRegisterContextForFrame(), lldb_private::minidump::ThreadMinidump::CreateRegisterContextForFrame(), lldb_private::PlatformQemuUser::DebugProcess(), 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(), DumpTriple(), EmulateInstructionMIPS::EmulateInstructionMIPS(), EmulateInstructionMIPS64::EmulateInstructionMIPS64(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), lldb_private::DynamicRegisterInfo::Finalize(), lldb_private::Disassembler::FindPluginForTarget(), lldb_private::PlatformAppleSimulator::FindProcesses(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FindProcesses(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), DisassemblerLLVMC::FlavorValidForArchSpec(), lldb_private::FormatEntity::Format(), ObjectFileMachO::GetAllArchSpecs(), lldb_private::Platform::GetAugmentedArchSpec(), lldb_private::Module::GetCacheKey(), GetClangTargetCPU(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb::SBDebugger::GetDefaultArchitecture(), lldb_private::EmulateInstructionARM::GetFramePointerDWARFRegisterNumber(), lldb_private::EmulateInstructionARM::GetFramePointerRegisterNumber(), EmulateInstructionARM64::GetFramePointerRegisterNumber(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), ProcessKDP::GetHostArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), GetMacOSXProcessArgs(), lldb_private::platform_freebsd::PlatformFreeBSD::GetMmapArgumentList(), GetModuleConfig(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModuleInfo(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetModuleSpec(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetModuleSpec(), ObjectFileELF::GetModuleSpecifications(), ObjectFilePECOFF::GetModuleSpecifications(), lldb_private::AppleObjCRuntime::GetObjCVersion(), ObjectFileELF::GetSectionHeaderInfo(), lldb_private::Thread::GetSiginfoValue(), GetSoftwareBreakpointSize(), lldb_private::Platform::GetStatus(), lldb_private::PlatformMacOSX::GetSupportedArchitectures(), lldb::SBPlatform::GetTriple(), lldb_private::Process::GetWatchpointReportedAfter(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qHostInfo(), lldb_private::Module::Hash(), IsAlwaysThumbInstructions(), IsFullySpecifiedTriple(), isLoadBiasIncorrect(), IsMatch(), IsMIPS(), lldb_private::GNUstepObjCRuntime::IsModuleObjCLibrary(), lldb_private::PosixPlatformCommandOptionValidator::IsValid(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchGDBServer(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), lldb_private::SymbolLocatorDefault::LocateExecutableSymbolFile(), lldb_private::ABI::MakeMCRegisterInfo(), lldb_private::Module::MergeArchitecture(), lldb_private::Target::MergeArchitecture(), MergeFrom(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), ObjectFileELF::ParseARMAttributes(), ParseLangArgs(), lldb_private::ParseMachCPUDashSubtypeTriple(), ParseModuleSpec(), lldb_private::platform_freebsd::PlatformFreeBSD::PlatformFreeBSD(), lldb_private::platform_linux::PlatformLinux::PlatformLinux(), lldb_private::platform_netbsd::PlatformNetBSD::PlatformNetBSD(), DYLDRendezvous::ReadSOEntryFromMemory(), lldb_private::AssertFrameRecognizer::RecognizeFrame(), ObjectFileELF::RefineModuleDetailsFromNote(), lldb_private::minidump::ProcessMinidump::RefreshStateAfterStop(), lldb_private::RegisterAssertFrameRecognizer(), RegisterContextCorePOSIX_arm64::RegisterContextCorePOSIX_arm64(), RegisterContextCorePOSIX_mips64::RegisterContextCorePOSIX_mips64(), RegisterContextCorePOSIX_powerpc::RegisterContextCorePOSIX_powerpc(), RegisterContextCorePOSIX_ppc64le::RegisterContextCorePOSIX_ppc64le(), RegisterContextCorePOSIX_riscv64::RegisterContextCorePOSIX_riscv64(), RegisterContextCorePOSIX_s390x::RegisterContextCorePOSIX_s390x(), RegisterContextCorePOSIX_x86_64::RegisterContextCorePOSIX_x86_64(), lldb_private::DebuggerStats::ReportStatistics(), ObjectFileMachO::SaveCore(), sdkSupportsBuiltinModules(), lldb_private::Target::SetArchitecture(), lldb_private::Target::SetDefaultArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::EmulateInstructionARM::SetInstruction(), CommandObjectProcessLoad::CommandOptions::SetOptionValue(), lldb_private::EmulateInstructionARM::SetTargetTriple(), lldb_private::EmulateInstructionPPC64::SetTargetTriple(), EmulateInstructionARM64::SetTargetTriple(), EmulateInstructionMIPS::SetTargetTriple(), EmulateInstructionMIPS64::SetTargetTriple(), SetupTargetOpts(), DYLDRendezvous::SOEntryIsMainExecutable(), lldb_private::process_linux::NativeProcessLinux::SupportHardwareSingleStepping(), lldb_private::EmulateInstructionLoongArch::SupportsThisArch(), lldb_private::EmulateInstructionRISCV::SupportsThisArch(), lldb_private::Target::Target(), lldb_private::EmulateInstructionARM::TestEmulation(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::DynamicLoaderDarwin::UseDYLDSPI(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), 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 455 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 1424 of file ArchSpec.cpp.

References eCore_arm_armv6m, eCore_arm_armv7em, eCore_arm_armv7m, eCore_thumbv6m, eCore_thumbv7em, eCore_thumbv7m, GetCore(), and GetTriple().

Referenced by lldb_private::Disassembler::Disassembler(), DisassemblerLLVMC::DisassemblerLLVMC(), ObjectFileMachO::ParseSymtab(), lldb_private::EmulateInstructionARM::ReadInstruction(), lldb_private::EmulateInstructionARM::SetInstruction(), and lldb_private::EmulateInstructionARM::TestEmulation().

◆ IsCompatibleMatch()

bool lldb_private::ArchSpec::IsCompatibleMatch ( const ArchSpec rhs) const
inline

◆ IsExactMatch()

bool lldb_private::ArchSpec::IsExactMatch ( const ArchSpec rhs) const
inline

◆ IsFullySpecifiedTriple()

bool ArchSpec::IsFullySpecifiedTriple ( ) const

Definition at line 1409 of file ArchSpec.cpp.

References GetTriple(), TripleOSWasSpecified(), and TripleVendorWasSpecified().

◆ IsMatch()

bool ArchSpec::IsMatch ( const ArchSpec rhs,
MatchType  match 
) const

Compare this ArchSpec to another ArchSpec.

match specifies the kind of matching that is to be done. CompatibleMatch requires only a compatible cpu type (e.g., armv7s is compatible with armv7). ExactMatch requires an exact match (armv7s is not an exact match with armv7).

Returns
true if the two ArchSpecs match.

Definition at line 972 of file ArchSpec.cpp.

References CompatibleMatch, cores_match(), ExactMatch, GetByteOrder(), GetCore(), GetTriple(), IsCompatibleEnvironment(), TripleOSWasSpecified(), and TripleVendorWasSpecified().

Referenced by lldb_private::Platform::IsCompatibleArchitecture(), IsCompatibleMatch(), and IsExactMatch().

◆ 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 348 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::Process::CompleteAttach(), lldb_private::HostInfoAndroid::ComputeHostArchitectureSupport(), lldb_private::HostInfoLinux::ComputeHostArchitectureSupport(), lldb_private::platform_android::PlatformAndroid::CreateInstance(), lldb_private::PlatformRemoteAppleBridge::CreateInstance(), lldb_private::PlatformRemoteAppleWatch::CreateInstance(), lldb_private::PlatformRemoteiOS::CreateInstance(), lldb_private::PlatformRemoteMacOSX::CreateInstance(), lldb_private::PlatformRemoteAppleTV::CreateInstance(), lldb_private::PlatformRemoteAppleXR::CreateInstance(), lldb_private::PlatformAppleSimulator::CreateInstance(), lldb_private::TypeSystemClang::CreateInstance(), lldb_private::OptionGroupPlatform::CreatePlatformWithOptions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle(), lldb_private::TargetList::CreateTargetInternal(), lldb::SBDebugger::CreateTargetWithFileAndArch(), lldb_private::Debugger::Debugger(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::Platform::DoConnectProcess(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), CommandObjectTargetModulesAdd::DoExecute(), lldb_private::CommandObjectDisassemble::DoExecute(), CommandObjectProcessAttach::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), ProcessMachCore::DoLoadCore(), lldb_private::ProcessInstanceInfo::Dump(), lldb_private::ModuleSpec::Dump(), lldb_private::ProcessInstanceInfo::DumpAsTableRow(), DumpTargetInfo(), lldb_private::OptionValueArch::DumpValue(), ObjectContainerBSDArchive::Archive::FindCachedArchive(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FindProcesses(), lldb_private::FormatEntity::Format(), lldb_private::minidump::MinidumpParser::GetArchitecture(), lldb_private::OptionGroupArchitecture::GetArchitecture(), lldb_private::ModuleSpec::GetArchitecturePtr(), lldb_private::Platform::GetAugmentedArchSpec(), lldb::SBDebugger::GetDefaultArchitecture(), lldb_private::Module::GetDescription(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(), ObjectContainerBSDArchive::GetModuleSpecifications(), ObjectFileELF::GetModuleSpecifications(), ObjectContainerUniversalMachO::GetObjectFile(), lldb_private::PlatformList::GetOrCreate(), lldb_private::Platform::GetRemoteSharedModule(), lldb_private::ModuleList::GetSharedModule(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetStatus(), lldb_private::Platform::GetSystemArchitecture(), lldb::SBPlatform::GetTriple(), lldb_private::Process::GetWatchpointReportedAfter(), lldb_private::Platform::IsCompatibleArchitecture(), lldb_private::Target::Launch(), lldb::SBTarget::Launch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), 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::Platform::ResolveExecutable(), SetArchitecture(), lldb_private::Target::SetArchitecture(), lldb_private::Module::SetArchitecture(), lldb::SBDebugger::SetDefaultArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::Platform::SetSystemArchitecture(), SetTriple(), SetupTargetOpts(), shouldSkipSimulatorPlatform(), lldb_private::Target::Target(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues().

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

References CoreUpdated(), eCore_arm_generic, eCore_uknownMach64, GetCore(), GetFlags(), GetTriple(), IsCompatibleMatch(), m_core, SetFlags(), TripleEnvironmentWasSpecified(), TripleOSWasSpecified(), TripleVendorWasSpecified(), and UpdateCore().

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

References IsValid().

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

References lldb_private::CoreDefinition::core, ArchDefinitionEntry::core, CoreUpdated(), lldb_private::eArchTypeCOFF, lldb_private::eArchTypeELF, lldb_private::eArchTypeMachO, FindArchDefinition(), FindArchDefinitionEntry(), FindCoreDefinition(), lldb_private::GetLog(), IsValid(), kCore_invalid, LLDB_LOGF, m_core, m_triple, lldb_private::CoreDefinition::machine, lldb_private::CoreDefinition::name, lldb_private::Platform, lldb_private::Process, and lldb_private::Target.

Referenced by ArchSpec(), 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 423 of file ArchSpec.h.

References m_byte_order.

◆ SetFlags() [1/2]

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

Definition at line 583 of file ArchSpec.cpp.

References eMIPSABI_N32, eMIPSABI_N64, eMIPSABI_O32, GetFlags(), IsMIPS(), and SetFlags().

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

References IsValid(), m_triple, and UpdateCore().

Referenced by ArchSpec(), 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(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModuleInfo(), lldb_private::ObjectFilePDB::GetModuleSpecifications(), ObjectFilePECOFF::GetModuleSpecifications(), ObjectContainerUniversalMachO::GetObjectFile(), ParseModuleSpec(), SetTriple(), lldb_private::OptionValueArch::SetValueFromString(), lldb_private::Instruction::TestEmulation(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos().

◆ SetTriple() [2/2]

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

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

Referenced by Clear(), CoreUpdated(), GetByteOrder(), SetByteOrder(), and UpdateCore().

◆ m_core

Core lldb_private::ArchSpec::m_core = kCore_invalid
protected

◆ m_flags

uint32_t lldb_private::ArchSpec::m_flags = 0
protected

Definition at line 536 of file ArchSpec.h.

Referenced by Clear(), GetAddressByteSize(), GetFlags(), and SetFlags().

◆ m_triple

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

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