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

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 2 09:28:41 PDT 2026


================
@@ -0,0 +1,24 @@
+# REQUIRES: x86
+
+# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out
+# RUN: %lldb -b -o "breakpoint set --name main" \
+# RUN:        -o run \
+# RUN:        -o "register read rip r10d rflags" \
+# RUN:        -o "register read" \
+# RUN:        %t.out | FileCheck --strict-whitespace %s
+
+# CHECK: (lldb) register read rip r10d rflags
+# CHECK-NEXT: {{^     rip = }}
+# CHECK-NEXT: {{^    r10d = }}
+# CHECK-NEXT: {{^  rflags = }}
+
+# CHECK: (lldb) register read
+# CHECK: General Purpose Registers:
+# CHECK: {{      rsi = }}
+# CHECK: {{       r8 = }}
+# CHECK: {{      rip = }}
+# CHECK: {{   rflags = }}
+# CHECK: {{       cs = }}
+# CHECK: {{  fs_base = }}
+# CHECK: {{  gs_base = }}
+# CHECK: {{       ds = }}
----------------
DavidSpickett wrote:

This is where I'd like to see a second set, if there's one we can rely on existing. To show that they align within a set but not across all sets.

Picking a second set may be a problem, and if so, that's where making this an API test could help. So you can say "test the basics, and if we have this register set, check it aligns differently".

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


More information about the lldb-commits mailing list