Skip to content

Commit b2c906d

Browse files
committed
Revert "[lldb] Remove "dwarf dynamic register size expressions" from RegisterInfo"
This reverts commit 00e704b. This commit should should have updated llvm/llvm-project/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp like the other architectures.
1 parent f37e8b0 commit b2c906d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1581
-821
lines changed

lldb/include/lldb/Target/DynamicRegisterInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class DynamicRegisterInfo {
108108
name_collection m_set_names;
109109
reg_to_regs_map m_value_regs_map;
110110
reg_to_regs_map m_invalidate_regs_map;
111+
dynamic_reg_size_map m_dynamic_reg_size_map;
111112
size_t m_reg_data_byte_size = 0u; // The number of bytes required to store
112113
// all registers
113114
bool m_finalized = false;

lldb/include/lldb/Target/RegisterContext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ class RegisterContext : public std::enable_shared_from_this<RegisterContext>,
3131

3232
virtual const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) = 0;
3333

34+
// Detect the register size dynamically.
35+
uint32_t UpdateDynamicRegisterSize(const lldb_private::ArchSpec &arch,
36+
RegisterInfo *reg_info);
37+
3438
virtual size_t GetRegisterSetCount() = 0;
3539

3640
virtual const RegisterSet *GetRegisterSet(size_t reg_set) = 0;

lldb/include/lldb/lldb-private-types.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ struct RegisterInfo {
5858
/// this register changes. For example, the invalidate list for eax would be
5959
/// rax ax, ah, and al.
6060
uint32_t *invalidate_regs;
61+
/// A DWARF expression that when evaluated gives the byte size of this
62+
/// register.
63+
const uint8_t *dynamic_size_dwarf_expr_bytes;
64+
/// The length of the DWARF expression in bytes in the
65+
/// dynamic_size_dwarf_expr_bytes member.
66+
size_t dynamic_size_dwarf_len;
6167

6268
llvm::ArrayRef<uint8_t> data(const uint8_t *context_base) const {
6369
return llvm::ArrayRef<uint8_t>(context_base + byte_offset, byte_size);

0 commit comments

Comments
 (0)