forked from OSchip/llvm-project
[lldb] [Process/elf-core] Fix reading FPRs from FreeBSD/i386 cores
The FreeBSD coredumps from i386 systems contain only FSAVE-style NT_FPREGSET. Since we do not really support reading that kind of data anymore, just use NT_X86_XSTATE to get FXSAVE-style data when available. Differential Revision: https://reviews.llvm.org/D101086
This commit is contained in:
parent
fdb055f4f1
commit
b6c0edb979
|
@ -96,6 +96,9 @@ DataExtractor getRegset(llvm::ArrayRef<CoreNote> Notes,
|
|||
llvm::ArrayRef<RegsetDesc> 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.
|
||||
|
|
|
@ -10,4 +10,7 @@ register read --all
|
|||
# CHECK-DAG: ds = 0x0000003b
|
||||
# CHECK-DAG: es = 0x0000003b
|
||||
|
||||
# TODO: fix reading fp registers
|
||||
# CHECK-DAG: fiseg = 0x00000000
|
||||
# CHECK-DAG: fioff = 0x00401c52
|
||||
# CHECK-DAG: foseg = 0x00000000
|
||||
# CHECK-DAG: fooff = 0xffffd8b8
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue