9#ifndef LLDB_UTILITY_ARCHSPEC_H
10#define LLDB_UTILITY_ARCHSPEC_H
16#include "llvm/ADT/StringRef.h"
17#include "llvm/TargetParser/Triple.h"
285 explicit ArchSpec(
const llvm::Triple &triple);
286 explicit ArchSpec(
const char *triple_cstr);
287 explicit ArchSpec(llvm::StringRef triple_str);
293 uint32_t cpu_subtype);
351 explicit operator bool()
const {
return IsValid(); }
354 return !
m_triple.getVendorName().empty();
469 bool SetTriple(
const llvm::Triple &triple);
471 bool SetTriple(llvm::StringRef triple_str);
525 void SetFlags(
const std::string &elf_abi);
An architecture specification class.
static void ListSupportedArchNames(StringList &list)
bool IsFullySpecifiedTriple() const
@ eLoongArchSubType_loongarch64
@ eLoongArchSubType_unknown
@ eLoongArchSubType_loongarch32
void SetByteOrder(lldb::ByteOrder byte_order)
Sets this ArchSpec's byte order.
@ eCore_hexagon_hexagonv5
@ eCore_hexagon_hexagonv4
static void AutoComplete(CompletionRequest &request)
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
uint32_t GetCodeByteSize() const
Architecture code byte width accessor.
bool IsValid() const
Tests if this ArchSpec is valid.
void Clear()
Clears the object state.
llvm::Triple & GetTriple()
Architecture triple accessor.
void SetFlags(uint32_t flags)
bool IsAlwaysThumbInstructions() const
Detect whether this architecture uses thumb code exclusively.
bool TripleEnvironmentWasSpecified() const
bool IsMatch(const ArchSpec &rhs, MatchType match) const
Compare this ArchSpec to another ArchSpec.
bool SetTriple(const llvm::Triple &triple)
Architecture triple setter.
lldb::ByteOrder GetDefaultEndian() const
Returns the default endianness of the architecture.
lldb::ByteOrder m_byte_order
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.
void MergeFrom(const ArchSpec &other)
Merges fields from another ArchSpec into this ArchSpec.
void DumpTriple(llvm::raw_ostream &s) const
uint32_t GetMachOCPUSubType() const
void CoreUpdated(bool update_triple)
bool IsMIPS() const
if MIPS architecture return true.
uint32_t GetDataByteSize() const
Architecture data byte width accessor.
bool IsCompatibleMatch(const ArchSpec &rhs) const
Shorthand for IsMatch(rhs, CompatibleMatch).
bool CharIsSignedByDefault() const
Returns true if 'char' is a signed type by default in the architecture false otherwise.
bool IsExactMatch(const ArchSpec &rhs) const
Shorthand for IsMatch(rhs, ExactMatch).
ArchSpec()
Default constructor.
uint32_t GetMachOCPUType() const
std::string GetTargetABI() const
Return a string representing target application ABI.
uint32_t GetMinimumOpcodeByteSize() const
uint32_t GetFlags() const
@ eMIPSSubType_mips32r6el
@ eMIPSSubType_mips64r6el
@ eMIPSSubType_mips64r2el
@ eMIPSSubType_mips32r2el
lldb::ByteOrder GetByteOrder() const
Returns the byte order for the architecture specification.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
@ eRISCV_float_abi_double
single precision floating point, +f
@ eRISCV_float_abi_soft
RVC, +c.
@ eRISCV_float_abi_quad
double precision floating point, +d
@ eRISCV_float_abi_mask
quad precision floating point, +q
@ eRISCV_float_abi_single
soft float
std::string GetClangTargetCPU() const
Returns a string representing current architecture as a target CPU for tools like compiler,...
uint32_t GetMaximumOpcodeByteSize() const
bool TripleVendorWasSpecified() const
bool TripleOSWasSpecified() const
static bool ContainsOnlyArch(const llvm::Triple &normalized_triple)
Returns true if the OS, vendor and environment fields of the triple are unset.
const llvm::Triple & GetTriple() const
Architecture triple accessor.
const char * GetArchitectureName() const
Returns a static string representing the current architecture.
"lldb/Utility/ArgCompletionRequest.h"
A class that represents a running process on the host machine.
bool ParseMachCPUDashSubtypeTriple(llvm::StringRef triple_str, ArchSpec &arch)
bool operator==(const Address &lhs, const Address &rhs)
bool operator<(const Address &lhs, const Address &rhs)
ByteOrder
Byte ordering definitions.