Index: lldb/source/Plugins/Process/elf-core/RegisterUtilities.h =================================================================== --- lldb/source/Plugins/Process/elf-core/RegisterUtilities.h +++ lldb/source/Plugins/Process/elf-core/RegisterUtilities.h @@ -96,6 +96,9 @@ llvm::ArrayRef RegsetDescs); constexpr RegsetDesc FPR_Desc[] = { + // FreeBSD/i386 core NT_FPREGSET is x87 FSAVE result but the XSAVE dump + // starts with FXSAVE struct, so use that instead if available. + {llvm::Triple::FreeBSD, llvm::Triple::x86, llvm::ELF::NT_X86_XSTATE}, {llvm::Triple::FreeBSD, llvm::Triple::UnknownArch, llvm::ELF::NT_FPREGSET}, // In a i386 core file NT_FPREGSET is present, but it's not the result // of the FXSAVE instruction like in 64 bit files. Index: lldb/test/Shell/Register/Core/x86-32-freebsd-fp.test =================================================================== --- /dev/null +++ lldb/test/Shell/Register/Core/x86-32-freebsd-fp.test @@ -0,0 +1,3 @@ +# RUN: %lldb -b -s %s -c %p/Inputs/x86-32-freebsd.core | FileCheck %p/Inputs/x86-fp.check + +register read --all