Skip to content

Commit

Permalink
[lldb] Remove "dwarf dynamic register size expressions" from Register…
Browse files Browse the repository at this point in the history
…Info

These were added to support some mips registers on linux, but linux mips
support has now been removed due.

They are still referenced in the freebds mips implementation, but the
completeness of that implementation is also unknown. All other
architectures just set these fields to zero, which is a cause of
significant bloat in our register info definitions.

Arm also has registers with variable sizes, but they were implemented in
a more gdb-compatible fashion and don't use this feature.

Differential Revision: https://reviews.llvm.org/D110914
  • Loading branch information
labath committed Oct 6, 2021
1 parent 79d13bf commit 00e704b
Show file tree
Hide file tree
Showing 41 changed files with 821 additions and 1,581 deletions.
1 change: 0 additions & 1 deletion lldb/include/lldb/Target/DynamicRegisterInfo.h
Expand Up @@ -108,7 +108,6 @@ class DynamicRegisterInfo {
name_collection m_set_names;
reg_to_regs_map m_value_regs_map;
reg_to_regs_map m_invalidate_regs_map;
dynamic_reg_size_map m_dynamic_reg_size_map;
size_t m_reg_data_byte_size = 0u; // The number of bytes required to store
// all registers
bool m_finalized = false;
Expand Down
4 changes: 0 additions & 4 deletions lldb/include/lldb/Target/RegisterContext.h
Expand Up @@ -31,10 +31,6 @@ class RegisterContext : public std::enable_shared_from_this<RegisterContext>,

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

// Detect the register size dynamically.
uint32_t UpdateDynamicRegisterSize(const lldb_private::ArchSpec &arch,
RegisterInfo *reg_info);

virtual size_t GetRegisterSetCount() = 0;

virtual const RegisterSet *GetRegisterSet(size_t reg_set) = 0;
Expand Down
6 changes: 0 additions & 6 deletions lldb/include/lldb/lldb-private-types.h
Expand Up @@ -58,12 +58,6 @@ struct RegisterInfo {
/// this register changes. For example, the invalidate list for eax would be
/// rax ax, ah, and al.
uint32_t *invalidate_regs;
/// A DWARF expression that when evaluated gives the byte size of this
/// register.
const uint8_t *dynamic_size_dwarf_expr_bytes;
/// The length of the DWARF expression in bytes in the
/// dynamic_size_dwarf_expr_bytes member.
size_t dynamic_size_dwarf_len;

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

0 comments on commit 00e704b

Please sign in to comment.