[Lldb-commits] [lldb] [lldb] Add ability to show enum as name and value at the same time (PR #90059)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon May 13 01:44:41 PDT 2024


DavidSpickett wrote:

>So each ValueObject has the ability to show its value as an enumeration if its format is set to eFormatEnum. If the format is set to eFormatHex, eFormatUnsigned, or eFormatSigned, then we show the numeric value.

Sure, the problem I have is that often with registers you'd want to see not just the name but the value. It's not 100% crucial for the feature but I found it useful in a previous debugger I used.

>Can you show some sample output for this?

I only have examples for registers right now, for example AArch64's mte_ctrl will look like (where TCF is an enum):
```
= (TAGS = 65535, TCF = TCF_SYNC (1), TAGGED_ADDR_ENABLE = 1)
```
So that users know what a value means (no looking in the manuals) and the value (in case they need to add to or confirm the number they see in their source code).

When I've added tests for the existing options, I'll update this PR with test cases that are not register specific.

https://github.com/llvm/llvm-project/pull/90059


More information about the lldb-commits mailing list