[Lldb-commits] [PATCH] D152918: [lldb] Add register field tables to the "register info" command
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 14 06:50:53 PDT 2023
DavidSpickett created this revision.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This teaches DumpRegisterInfo to generate a table from the register
flags type. It just calls a method on RegisterFlags.
As such, the extra tests are minimal and only show that the intergration
works. Exhaustive formatting tests are done with RegisterFlags itself.
Example:
(lldb) register info cpsr
Name: cpsr
Size: 4 bytes (32 bits)
In sets: general (index 0)
| 31 | 30 | 29 | 28 | 27-26 | 25 | 24 | 23 | 22 | 21 | 20 | 19-13 | 12 | 11-10 | 9 | 8 | 7 | 6 | 5 | 4 | 3-2 | 1 | 0 |
|----|----|----|----|-------|-----|-----|-----|-----|----|----|-------|------|-------|---|---|---|---|---|-----|-----|---|----|
| N | Z | C | V | | TCO | DIT | UAO | PAN | SS | IL | | SSBS | | D | A | I | F | | nRW | EL | | SP |
LLDB limits the max terminal width to 80 chars by default.
So to get that full width output you will need to change the "term-width"
setting to something higher.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152918
Files:
lldb/include/lldb/Core/DumpRegisterInfo.h
lldb/source/Commands/CommandObjectRegister.cpp
lldb/source/Core/DumpRegisterInfo.cpp
lldb/test/API/commands/register/register/register_command/TestRegisters.py
lldb/test/API/functionalities/gdb_remote_client/TestXMLRegisterFlags.py
lldb/unittests/Core/DumpRegisterInfoTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152918.531311.patch
Type: text/x-patch
Size: 11586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230614/f31d941f/attachment.bin>
More information about the lldb-commits
mailing list