Support only showing full width regsiters
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 331
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Registers can be full width or not, e.g., eax v.s. rax. Currently, the debugger does not understand this relationship and shows al registers. This makes the register list very long and hard to read. Also, when a register value gets modified by the user, we have to invalidate all values of the register and re-read them. In theory, this can be avoided by carefully updating the values of a set of related registers.
We should let the debugger understand the relationship between registers and offer to only show full width registers. Currently, DbgEng offers a convenient way to read the register width info, IDebugRegisters2::GetDescription. It uses the following structure:
typedef struct _DEBUG_REGISTER_DESCRIPTION {
ULONG Type;
ULONG Flags;
ULONG SubregMaster;
ULONG SubregLength;
ULONG64 SubregMask;
ULONG SubregShift;
ULONG Reserved0;
} DEBUG_REGISTER_DESCRIPTION, *PDEBUG_REGISTER_DESCRIPTION;
However, there seems no way to read this information in LLDB -- LLDB may not have this notion at all.
The Architectures themself do have the info we want. However, it may not be 100% accurate because the debugger backend sometimes a different name for the register, so the info does not map directly. Also, the debugger reports registers that are not present in the arch. That said, since the registers reported by LLDB/DbgEng are unlikely to change, we can hard-code certain information about them as a complimentary to the info already present in the arch
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the DbgEng IDebugRegisters2::GetDescription information and how LLDB and the architecture definitions represent registers. Determine how backend-reported names map to architecture registers and define the full-width display and related-register invalidation behavior; done means the debugger can offer full-width-only viewing while preserving correct updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100