================
@@ -51,6 +55,23 @@ bool RegisterContextCorePOSIX_arm::ReadRegister(const 
RegisterInfo *reg_info,
       return true;
     }
   }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM)
+    return false;
+
+  if (IsFPR(reg)) {
+    assert(offset >= GetGPRSize());
+    offset -= GetGPRSize();
+    if (m_fpr.ValidOffsetForDataOfSize(offset, reg_info->byte_size)) {
+      Status error;
+      value.SetFromMemoryData(*reg_info, m_fpr.GetDataStart() + offset,
+                              reg_info->byte_size, lldb::eByteOrderLittle,
----------------
DavidSpickett wrote:

Unlikely anyone will ever notice but in the RegisterContextCorePOSIX_arm 
constructor, m_gpr is set to the endian of the passed in GPRs. Which I hope is 
that of the core file itself. The same should happen for FPR, you can use the 
GPR's endian.

Best leave the line I'm commenting on as it is, as it does match what AArch64 
does. I've never head of anyone using lldb with BE AArch64 let alone loading a 
core file from it.

At least if you do the thing in the constructor, it's one fewer fix to do if 
someone does use BE Arm core files.

https://github.com/llvm/llvm-project/pull/155956
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to