[Lldb-commits] [lldb] [lldb] Improved formatting of 'register read' command. (PR #188049)

via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 2 08:28:29 PDT 2026


================
@@ -195,6 +253,8 @@ class CommandObjectRegisterRead : public CommandObjectParsed {
         result.AppendError("the --set <set> option can't be used when "
                            "registers names are supplied as arguments\n");
       } else {
+        int alignment = ComputeMatchingAlignment(command, reg_ctx, !m_command_options.dump_all_sets.GetCurrentValue());
+        alignment += 2; // Extra ident to be consistent with register sets dumping
----------------
Rifet-c wrote:

Well, I suppose that now they are a bit more useful, since reg names are dynamically aligned, so for the readability's sake, there should be some guaranteed extra space between the left border of the console and a first register name. Though, if you don't want this extra indent, I can remove it completely.

(What I mean by having no space in the console)
```
   r15 = 0x0000000000000000
   rip = 0x00005555555551af  hello`main + 15 at main.cpp:4:15
rflags = 0x0000000000000202
```
Against
```
      r15 = 0x0000000000000000
      rip = 0x00005555555551af  hello`main + 15 at main.cpp:4:15
   rflags = 0x0000000000000202
```

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


More information about the lldb-commits mailing list