[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
Mon Sep 1 02:07:51 PDT 2025
================
@@ -16,7 +16,7 @@ static std::optional<uint32_t>
getNoteType(const llvm::Triple &Triple,
llvm::ArrayRef<RegsetDesc> RegsetDescs) {
for (const auto &Entry : RegsetDescs) {
- if (Entry.OS != Triple.getOS())
+ if (Entry.OS != llvm::Triple::UnknownOS && Entry.OS != Triple.getOS())
----------------
DavidSpickett wrote:
This code path is difficult to understand, which is not your fault but context for why I'm wary of you doing it this way just to make it neater for Arm.
Can you do what is done for PPC below?
```
constexpr RegsetDesc PPC_VMX_Desc[] = {
{llvm::Triple::FreeBSD, llvm::Triple::UnknownArch, llvm::ELF::NT_PPC_VMX},
{llvm::Triple::Linux, llvm::Triple::UnknownArch, llvm::ELF::NT_PPC_VMX},
};
```
This makes our assumptions explicit.
I do agree that it's unlikely someone would reuse the note type, but I think we benefit more from making the assumptions clear in our source code, than some random OS will do for being able to read VFP regs out of its core files.
I'd assume anyone with the skills to build such an OS can do their own patching to make LLDB work if it came to it.
https://github.com/llvm/llvm-project/pull/155956
More information about the lldb-commits
mailing list