39 const addr_t pac_sign_extension = 0x0080000000000000ULL;
40 addr_t mask = process_sp->GetCodeAddressMask();
42 if (
pc & pac_sign_extension &&
44 mask = process_sp->GetHighmemCodeAddressMask();
56 const addr_t pac_sign_extension = 0x0080000000000000ULL;
57 addr_t mask = process_sp->GetDataAddressMask();
59 if (
pc & pac_sign_extension &&
61 mask = process_sp->GetHighmemDataAddressMask();
68std::pair<uint32_t, uint32_t>
74 return MCBasedABI::GetEHAndDWARFNums(name);
85 return llvm::StringSwitch<uint32_t>(name)
103 std::vector<lldb_private::DynamicRegisterInfo::Register> ®s,
104 llvm::ArrayRef<std::optional<uint32_t>> full_reg_indices,
105 uint32_t full_reg_size,
const char *partial_reg_format,
107 for (
auto it : llvm::enumerate(full_reg_indices)) {
108 std::optional<uint32_t> full_reg_index = it.value();
109 if (!full_reg_index || regs[*full_reg_index].byte_size != full_reg_size)
114 llvm::formatv(partial_reg_format, it.index()).str()),
127 addSupplementaryRegister(regs, partial_reg);
132 std::vector<lldb_private::DynamicRegisterInfo::Register> ®s) {
137 std::array<std::optional<uint32_t>, 32> x_regs;
138 std::array<std::optional<uint32_t>, 32> v_regs;
140 for (
auto it : llvm::enumerate(regs)) {
146 unsigned int reg_num;
147 auto get_reg = [&info, ®_num](
const char *prefix) {
150 return (reg_name.consume_front(prefix) &&
151 llvm::to_integer(reg_name, reg_num, 10) && reg_num < 32) ||
152 (alt_name.consume_front(prefix) &&
153 llvm::to_integer(alt_name, reg_num, 10) && reg_num < 32);
157 x_regs[reg_num] = it.index();
158 else if (get_reg(
"v"))
159 v_regs[reg_num] = it.index();
161 else if (get_reg(
"w") || get_reg(
"s") || get_reg(
"d"))
static void addPartialRegisters(std::vector< lldb_private::DynamicRegisterInfo::Register > ®s, llvm::ArrayRef< std::optional< uint32_t > > full_reg_indices, uint32_t full_reg_size, const char *partial_reg_format, uint32_t partial_reg_size, lldb::Encoding encoding, lldb::Format format)
#define LLDB_PLUGIN_DEFINE(PluginName)
lldb::addr_t FixDataAddress(lldb::addr_t pc) override
lldb::addr_t FixCodeAddress(lldb::addr_t pc) override
Some targets might use bits in a code address to indicate a mode switch.
uint32_t GetGenericNum(llvm::StringRef name) override
Return the generic number of the given register.
virtual lldb::addr_t FixAddress(lldb::addr_t pc, lldb::addr_t mask)
void AugmentRegisterInfo(std::vector< lldb_private::DynamicRegisterInfo::Register > ®s) override
std::pair< uint32_t, uint32_t > GetEHAndDWARFNums(llvm::StringRef name) override
Return eh_frame and dwarf numbers for the given register.
std::string GetMCName(std::string reg) override
For the given (capitalized) lldb register name, return the name of this register in the MCRegisterInf...
lldb::ProcessSP GetProcessSP() const
Request to get a Process shared pointer.
A uniqued constant string class.
void SetCString(const char *cstr)
Set the C string value.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
void AugmentRegisterInfo(std::vector< DynamicRegisterInfo::Register > ®s) override
static void MapRegisterName(std::string ®, llvm::StringRef from_prefix, llvm::StringRef to_prefix)
If the register name is of the form "<from_prefix>[<number>]" then change the name to "<to_prefix>[<n...
#define LLDB_REGNUM_GENERIC_RA
#define LLDB_REGNUM_GENERIC_ARG8
#define LLDB_INVALID_ADDRESS_MASK
Address Mask Bits not used for addressing are set to 1 in the mask; all mask bits set is an invalid v...
#define LLDB_REGNUM_GENERIC_ARG6
#define LLDB_INVALID_INDEX32
#define LLDB_REGNUM_GENERIC_SP
#define LLDB_REGNUM_GENERIC_ARG4
#define LLDB_REGNUM_GENERIC_ARG3
#define LLDB_REGNUM_GENERIC_ARG1
#define LLDB_REGNUM_GENERIC_ARG7
#define LLDB_REGNUM_GENERIC_FLAGS
#define LLDB_INVALID_REGNUM
#define LLDB_REGNUM_GENERIC_ARG2
#define LLDB_REGNUM_GENERIC_PC
#define LLDB_REGNUM_GENERIC_FP
#define LLDB_REGNUM_GENERIC_ARG5
Format
Display format definitions.
std::shared_ptr< lldb_private::Process > ProcessSP
Encoding
Register encoding definitions.
@ eEncodingUint
unsigned integer