[Lldb-commits] [lldb] [lldb][elf-core][ARM] Add support for VFP registers (PR #155956)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 4 05:14:36 PDT 2025


================
@@ -696,6 +696,31 @@ def test_arm_core(self):
 
         self.expect("register read --all")
 
+    @skipIfLLVMTargetMissing("ARM")
+    def test_arm_core_vfp(self):
+        # check reading VFP registers
+        target = self.dbg.CreateTarget(None)
+        self.assertTrue(target, VALID_TARGET)
+        process = target.LoadCore("linux-arm-vfp.core")
+
+        values = {}
+        values["d0"] = "0.5"
+        values["d1"] = "1.5"
+        values["d2"] = "2.5"
+        values["d3"] = "3.5"
+        values["s8"] = "4.5"
+        values["s9"] = "5.5"
+        values["s10"] = "6.5"
+        values["s11"] = "7.5"
+        values["fpscr"] = "0x20000000"
----------------
DavidSpickett wrote:

fpcsr is an individual control register, so we check that.

You're checking some D registers and then some S registers. s8 and s9 overlap d4, 10 and 11 overlap d5.

There are 16 D registers, so could we check them all, or alternatively, check the very last one? This makes sure we have the note size correct, or more likely, are reading the note size from the core file correctly.

I see that checking S registers that overlap D would get awkward. A nice neat number in D will be a strange number I think. So checking all S and all D is possible but awkward.

I think setting and checking D16 would be enough to make this more robust.

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


More information about the lldb-commits mailing list