Skip to content

Commit

Permalink
Revert "[lldb] Remove "dwarf dynamic register size expressions" from …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
MForster committed Oct 6, 2021
1 parent f37e8b0 commit b2c906d
Show file tree
Hide file tree
Showing 41 changed files with 1,581 additions and 821 deletions.
1 change: 1 addition & 0 deletions lldb/include/lldb/Target/DynamicRegisterInfo.h
Expand Up @@ -108,6 +108,7 @@ 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: 4 additions & 0 deletions lldb/include/lldb/Target/RegisterContext.h
Expand Up @@ -31,6 +31,10 @@ 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: 6 additions & 0 deletions lldb/include/lldb/lldb-private-types.h
Expand Up @@ -58,6 +58,12 @@ 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 b2c906d

Please sign in to comment.