Support only showing full width regsiters
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