summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/elf-core
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-11-16 13:38:57 +0000
committerPavel Labath <labath@google.com>2017-11-16 13:38:57 +0000
commitfd2c8d65722165034a0635cb3c7b2cb93a3d662d (patch)
treedd0630eaab9de63c571dcfe3df93331e643e2970 /lldb/source/Plugins/Process/elf-core
parentbfdf7b6c398ef6202ee5970dfd4e890cdef830d2 (diff)
downloadbcm5719-llvm-fd2c8d65722165034a0635cb3c7b2cb93a3d662d.tar.gz
bcm5719-llvm-fd2c8d65722165034a0635cb3c7b2cb93a3d662d.zip
Implement core dump debugging for PPC64le
Summary: Implement core dump debugging for PPC64le. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, krytarowski, clayborg, labath, lbianc, nemanjai, gut, anajuliapc, mgorny, kbarton, lldb-commits Differential Revision: https://reviews.llvm.org/D39681 Patch by Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br> llvm-svn: 318399
Diffstat (limited to 'lldb/source/Plugins/Process/elf-core')
-rw-r--r--lldb/source/Plugins/Process/elf-core/CMakeLists.txt1
-rw-r--r--lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp82
-rw-r--r--lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp132
-rw-r--r--lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.h52
-rw-r--r--lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp17
-rw-r--r--lldb/source/Plugins/Process/elf-core/ThreadElfCore.h3
-rw-r--r--lldb/source/Plugins/Process/elf-core/elf-core-enums.h55
7 files changed, 289 insertions, 53 deletions
diff --git a/lldb/source/Plugins/Process/elf-core/CMakeLists.txt b/lldb/source/Plugins/Process/elf-core/CMakeLists.txt
index c7ffae69532..5df4e269069 100644
--- a/lldb/source/Plugins/Process/elf-core/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/elf-core/CMakeLists.txt
@@ -7,6 +7,7 @@ add_lldb_library(lldbPluginProcessElfCore PLUGIN
RegisterContextPOSIXCore_arm64.cpp
RegisterContextPOSIXCore_mips64.cpp
RegisterContextPOSIXCore_powerpc.cpp
+ RegisterContextPOSIXCore_ppc64le.cpp
RegisterContextPOSIXCore_s390x.cpp
RegisterContextPOSIXCore_x86_64.cpp
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
index ed9058ef5c1..6993a9bfa8c 100644
--- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -36,6 +36,7 @@
// Project includes
#include "ProcessElfCore.h"
#include "ThreadElfCore.h"
+#include "elf-core-enums.h"
using namespace lldb_private;
@@ -427,40 +428,6 @@ lldb::addr_t ProcessElfCore::GetImageInfoAddress() {
return LLDB_INVALID_ADDRESS;
}
-/// Core files PT_NOTE segment descriptor types
-enum {
- NT_PRSTATUS = 1,
- NT_FPREGSET,
- NT_PRPSINFO,
- NT_TASKSTRUCT,
- NT_PLATFORM,
- NT_AUXV,
- NT_FILE = 0x46494c45,
- NT_PRXFPREG = 0x46e62b7f,
- NT_SIGINFO = 0x53494749,
- NT_OPENBSD_PROCINFO = 10,
- NT_OPENBSD_AUXV = 11,
- NT_OPENBSD_REGS = 20,
- NT_OPENBSD_FPREGS = 21,
-};
-
-namespace FREEBSD {
-
-enum {
- NT_PRSTATUS = 1,
- NT_FPREGSET,
- NT_PRPSINFO,
- NT_THRMISC = 7,
- NT_PROCSTAT_AUXV = 16,
- NT_PPC_VMX = 0x100
-};
-}
-
-namespace NETBSD {
-
-enum { NT_PROCINFO = 1, NT_AUXV, NT_AMD64_REGS = 33, NT_AMD64_FPREGS = 35 };
-}
-
// Parse a FreeBSD NT_PRSTATUS note - see FreeBSD sys/procfs.h for details.
static void ParseFreeBSDPrStatus(ThreadData &thread_data, DataExtractor &data,
ArchSpec &arch) {
@@ -563,8 +530,12 @@ Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
note.Parse(segment_data, &offset);
// Beginning of new thread
- if ((note.n_type == NT_PRSTATUS && have_prstatus) ||
- (note.n_type == NT_PRPSINFO && have_prpsinfo)) {
+ if (((note.n_type == LINUX::NT_PRSTATUS ||
+ note.n_type == FREEBSD::NT_PRSTATUS) &&
+ have_prstatus) ||
+ ((note.n_type == LINUX::NT_PRPSINFO ||
+ note.n_type == FREEBSD::NT_PRPSINFO) &&
+ have_prpsinfo)) {
assert(thread_data->gpregset.GetByteSize() > 0);
// Add the new thread to thread list
m_thread_data.push_back(*thread_data);
@@ -627,22 +598,22 @@ Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
// "OpenBSD@nnn" so match on the initial part of the string.
m_os = llvm::Triple::OpenBSD;
switch (note.n_type) {
- case NT_OPENBSD_PROCINFO:
+ case OPENBSD::NT_PROCINFO:
ParseOpenBSDProcInfo(*thread_data, note_data);
break;
- case NT_OPENBSD_AUXV:
+ case OPENBSD::NT_AUXV:
m_auxv = DataExtractor(note_data);
break;
- case NT_OPENBSD_REGS:
+ case OPENBSD::NT_REGS:
thread_data->gpregset = note_data;
break;
- case NT_OPENBSD_FPREGS:
+ case OPENBSD::NT_FPREGS:
thread_data->fpregset = note_data;
break;
}
} else if (note.n_name == "CORE") {
switch (note.n_type) {
- case NT_PRSTATUS:
+ case LINUX::NT_PRSTATUS:
have_prstatus = true;
error = prstatus.Parse(note_data, arch);
if (error.Fail())
@@ -652,17 +623,22 @@ Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
header_size = ELFLinuxPrStatus::GetSize(arch);
len = note_data.GetByteSize() - header_size;
thread_data->gpregset = DataExtractor(note_data, header_size, len);
+
+ if (arch.GetCore() == ArchSpec::eCore_ppc64le_generic)
+ thread_data->regsets.insert(
+ std::make_pair(note.n_type, thread_data->gpregset));
break;
- case NT_FPREGSET:
+ case LINUX::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.
// The result from FXSAVE is in NT_PRXFPREG for i386 core files
- if (arch.GetCore() == ArchSpec::eCore_x86_64_x86_64)
- thread_data->fpregset = note_data;
- else if(arch.IsMIPS())
+ if (arch.GetCore() == ArchSpec::eCore_x86_64_x86_64 || arch.IsMIPS())
thread_data->fpregset = note_data;
+ else if (arch.GetCore() == ArchSpec::eCore_ppc64le_generic) {
+ thread_data->regsets.insert(std::make_pair(note.n_type, note_data));
+ }
break;
- case NT_PRPSINFO:
+ case LINUX::NT_PRPSINFO:
have_prpsinfo = true;
error = prpsinfo.Parse(note_data, arch);
if (error.Fail())
@@ -670,10 +646,10 @@ Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
thread_data->name = prpsinfo.pr_fname;
SetID(prpsinfo.pr_pid);
break;
- case NT_AUXV:
+ case LINUX::NT_AUXV:
m_auxv = DataExtractor(note_data);
break;
- case NT_FILE: {
+ case LINUX::NT_FILE: {
m_nt_file_entries.clear();
lldb::offset_t offset = 0;
const uint64_t count = note_data.GetAddress(&offset);
@@ -691,7 +667,7 @@ Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
m_nt_file_entries[i].path.SetCString(path);
}
} break;
- case NT_SIGINFO: {
+ case LINUX::NT_SIGINFO: {
error = siginfo.Parse(note_data, arch);
if (error.Fail())
return error;
@@ -702,8 +678,14 @@ Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
} else if (note.n_name == "LINUX") {
switch (note.n_type) {
- case NT_PRXFPREG:
+ case LINUX::NT_PRXFPREG:
thread_data->fpregset = note_data;
+ break;
+ case LINUX::NT_PPC_VMX:
+ case LINUX::NT_PPC_VSX:
+ if (arch.GetCore() == ArchSpec::eCore_ppc64le_generic)
+ thread_data->regsets.insert(std::make_pair(note.n_type, note_data));
+ break;
}
}
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
new file mode 100644
index 00000000000..c84da895d95
--- /dev/null
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
@@ -0,0 +1,132 @@
+//===-- RegisterContextPOSIXCore_ppc64le.cpp --------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "RegisterContextPOSIXCore_ppc64le.h"
+
+#include "lldb/Core/RegisterValue.h"
+#include "lldb/Target/Thread.h"
+#include "lldb/Utility/DataBufferHeap.h"
+
+#include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
+#include "elf-core-enums.h"
+
+using namespace lldb_private;
+
+RegisterContextCorePOSIX_ppc64le::RegisterContextCorePOSIX_ppc64le(
+ Thread &thread, RegisterInfoInterface *register_info,
+ const llvm::DenseMap<uint32_t, lldb_private::DataExtractor> &regsets)
+ : RegisterContextPOSIX_ppc64le(thread, 0, register_info) {
+ DataExtractor gpregset = regsets.lookup(LINUX::NT_PRSTATUS);
+ m_gpr_buffer.reset(
+ new DataBufferHeap(gpregset.GetDataStart(), gpregset.GetByteSize()));
+ m_gpr.SetData(m_gpr_buffer);
+ m_gpr.SetByteOrder(gpregset.GetByteOrder());
+
+ DataExtractor fpregset = regsets.lookup(LINUX::NT_FPREGSET);
+ m_fpr_buffer.reset(
+ new DataBufferHeap(fpregset.GetDataStart(), fpregset.GetByteSize()));
+ m_fpr.SetData(m_fpr_buffer);
+ m_fpr.SetByteOrder(fpregset.GetByteOrder());
+
+ DataExtractor vmxregset = regsets.lookup(LINUX::NT_PPC_VMX);
+ m_vmx_buffer.reset(
+ new DataBufferHeap(vmxregset.GetDataStart(), vmxregset.GetByteSize()));
+ m_vmx.SetData(m_vmx_buffer);
+ m_vmx.SetByteOrder(vmxregset.GetByteOrder());
+
+ DataExtractor vsxregset = regsets.lookup(LINUX::NT_PPC_VSX);
+ m_vsx_buffer.reset(
+ new DataBufferHeap(vsxregset.GetDataStart(), vsxregset.GetByteSize()));
+ m_vsx.SetData(m_vsx_buffer);
+ m_vsx.SetByteOrder(vsxregset.GetByteOrder());
+}
+
+size_t RegisterContextCorePOSIX_ppc64le::GetFPRSize() const {
+ return k_num_fpr_registers_ppc64le * sizeof(uint64_t);
+}
+
+size_t RegisterContextCorePOSIX_ppc64le::GetVMXSize() const {
+ return (k_num_vmx_registers_ppc64le - 1) * sizeof(uint64_t) * 2 +
+ sizeof(uint32_t);
+}
+
+size_t RegisterContextCorePOSIX_ppc64le::GetVSXSize() const {
+ return k_num_vsx_registers_ppc64le * sizeof(uint64_t) * 2;
+}
+
+bool RegisterContextCorePOSIX_ppc64le::ReadRegister(
+ const RegisterInfo *reg_info, RegisterValue &value) {
+ lldb::offset_t offset = reg_info->byte_offset;
+
+ if (IsFPR(reg_info->kinds[lldb::eRegisterKindLLDB])) {
+ uint64_t v;
+ offset -= GetGPRSize();
+ offset = m_fpr.CopyData(offset, reg_info->byte_size, &v);
+
+ if (offset == reg_info->byte_size) {
+ value.SetBytes(&v, reg_info->byte_size, m_fpr.GetByteOrder());
+ return true;
+ }
+ } else if (IsVMX(reg_info->kinds[lldb::eRegisterKindLLDB])) {
+ uint32_t v[4];
+ offset -= GetGPRSize() + GetFPRSize();
+ offset = m_vmx.CopyData(offset, reg_info->byte_size, &v);
+
+ if (offset == reg_info->byte_size) {
+ value.SetBytes(v, reg_info->byte_size, m_vmx.GetByteOrder());
+ return true;
+ }
+ } else if (IsVSX(reg_info->kinds[lldb::eRegisterKindLLDB])) {
+ uint32_t v[4];
+ lldb::offset_t tmp_offset;
+ offset -= GetGPRSize() + GetFPRSize() + GetVMXSize();
+
+ if (offset < GetVSXSize() / 2) {
+ tmp_offset = m_vsx.CopyData(offset / 2, reg_info->byte_size / 2, &v);
+
+ if (tmp_offset != reg_info->byte_size / 2) {
+ return false;
+ }
+
+ uint8_t *dst = (uint8_t *)&v + sizeof(uint64_t);
+ tmp_offset = m_fpr.CopyData(offset / 2, reg_info->byte_size / 2, dst);
+
+ if (tmp_offset != reg_info->byte_size / 2) {
+ return false;
+ }
+
+ value.SetBytes(&v, reg_info->byte_size, m_vsx.GetByteOrder());
+ return true;
+ } else {
+ offset =
+ m_vmx.CopyData(offset - GetVSXSize() / 2, reg_info->byte_size, &v);
+ if (offset == reg_info->byte_size) {
+ value.SetBytes(v, reg_info->byte_size, m_vmx.GetByteOrder());
+ return true;
+ }
+ }
+ } else {
+ uint64_t v = m_gpr.GetMaxU64(&offset, reg_info->byte_size);
+
+ if (offset == reg_info->byte_offset + reg_info->byte_size) {
+ if (reg_info->byte_size < sizeof(v))
+ value = (uint32_t)v;
+ else
+ value = v;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool RegisterContextCorePOSIX_ppc64le::WriteRegister(
+ const RegisterInfo *reg_info, const RegisterValue &value) {
+ return false;
+}
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.h
new file mode 100644
index 00000000000..cd6494782b8
--- /dev/null
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.h
@@ -0,0 +1,52 @@
+//===-- RegisterContextPOSIXCore_ppc64le.h ----------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_RegisterContextCorePOSIX_ppc64le_h_
+#define liblldb_RegisterContextCorePOSIX_ppc64le_h_
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+#include "Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h"
+#include "lldb/Utility/DataExtractor.h"
+#include "llvm/ADT/DenseMap.h"
+
+class RegisterContextCorePOSIX_ppc64le : public RegisterContextPOSIX_ppc64le {
+public:
+ RegisterContextCorePOSIX_ppc64le(
+ lldb_private::Thread &thread,
+ lldb_private::RegisterInfoInterface *register_info,
+ const llvm::DenseMap<uint32_t, lldb_private::DataExtractor> &regsets);
+
+ bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
+ lldb_private::RegisterValue &value) override;
+
+ bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
+ const lldb_private::RegisterValue &value) override;
+
+protected:
+ size_t GetFPRSize() const;
+
+ size_t GetVMXSize() const;
+
+ size_t GetVSXSize() const;
+
+private:
+ lldb::DataBufferSP m_gpr_buffer;
+ lldb::DataBufferSP m_fpr_buffer;
+ lldb::DataBufferSP m_vmx_buffer;
+ lldb::DataBufferSP m_vsx_buffer;
+ lldb_private::DataExtractor m_gpr;
+ lldb_private::DataExtractor m_fpr;
+ lldb_private::DataExtractor m_vmx;
+ lldb_private::DataExtractor m_vsx;
+};
+
+#endif // liblldb_RegisterContextCorePOSIX_ppc64le_h_
diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
index 096c20363c7..3a1a4d9d40f 100644
--- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
@@ -18,9 +18,9 @@
#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
#include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
-#include "Plugins/Process/Utility/RegisterContextLinux_mips64.h"
-#include "Plugins/Process/Utility/RegisterContextLinux_mips.h"
#include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
+#include "Plugins/Process/Utility/RegisterContextLinux_mips.h"
+#include "Plugins/Process/Utility/RegisterContextLinux_mips64.h"
#include "Plugins/Process/Utility/RegisterContextLinux_s390x.h"
#include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
#include "Plugins/Process/Utility/RegisterContextNetBSD_x86_64.h"
@@ -28,11 +28,13 @@
#include "Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.h"
#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.h"
#include "ProcessElfCore.h"
#include "RegisterContextPOSIXCore_arm.h"
#include "RegisterContextPOSIXCore_arm64.h"
#include "RegisterContextPOSIXCore_mips64.h"
#include "RegisterContextPOSIXCore_powerpc.h"
+#include "RegisterContextPOSIXCore_ppc64le.h"
#include "RegisterContextPOSIXCore_s390x.h"
#include "RegisterContextPOSIXCore_x86_64.h"
#include "ThreadElfCore.h"
@@ -46,7 +48,8 @@ using namespace lldb_private;
ThreadElfCore::ThreadElfCore(Process &process, const ThreadData &td)
: Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp(),
m_signo(td.signo), m_gpregset_data(td.gpregset),
- m_fpregset_data(td.fpregset), m_vregset_data(td.vregset) {}
+ m_fpregset_data(td.fpregset), m_vregset_data(td.vregset),
+ m_regsets_data(td.regsets) {}
ThreadElfCore::~ThreadElfCore() { DestroyThread(); }
@@ -142,6 +145,9 @@ ThreadElfCore::CreateRegisterContextForFrame(StackFrame *frame) {
case llvm::Triple::mips64:
reg_interface = new RegisterContextLinux_mips64(arch);
break;
+ case llvm::Triple::ppc64le:
+ reg_interface = new RegisterInfoPOSIX_ppc64le(arch);
+ break;
case llvm::Triple::systemz:
reg_interface = new RegisterContextLinux_s390x(arch);
break;
@@ -213,6 +219,10 @@ ThreadElfCore::CreateRegisterContextForFrame(StackFrame *frame) {
*this, reg_interface, m_gpregset_data, m_fpregset_data,
m_vregset_data));
break;
+ case llvm::Triple::ppc64le:
+ m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_ppc64le(
+ *this, reg_interface, m_regsets_data));
+ break;
case llvm::Triple::systemz:
m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_s390x(
*this, reg_interface, m_gpregset_data, m_fpregset_data));
@@ -265,6 +275,7 @@ size_t ELFLinuxPrStatus::GetSize(lldb_private::ArchSpec &arch) {
switch (arch.GetCore()) {
case lldb_private::ArchSpec::eCore_s390x_generic:
case lldb_private::ArchSpec::eCore_x86_64_x86_64:
+ case lldb_private::ArchSpec::eCore_ppc64le_generic:
return sizeof(ELFLinuxPrStatus);
case lldb_private::ArchSpec::eCore_x86_32_i386:
case lldb_private::ArchSpec::eCore_x86_32_i486:
diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h
index 52187541371..c38a42e579a 100644
--- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h
+++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h
@@ -18,6 +18,7 @@
// Project includes
#include "lldb/Target/Thread.h"
#include "lldb/Utility/DataExtractor.h"
+#include "llvm/ADT/DenseMap.h"
struct compat_timeval {
alignas(8) uint64_t tv_sec;
@@ -131,6 +132,7 @@ struct ThreadData {
lldb_private::DataExtractor gpregset;
lldb_private::DataExtractor fpregset;
lldb_private::DataExtractor vregset;
+ llvm::DenseMap<uint32_t, lldb_private::DataExtractor> regsets;
lldb::tid_t tid;
int signo = 0;
int prstatus_sig = 0;
@@ -179,6 +181,7 @@ protected:
lldb_private::DataExtractor m_gpregset_data;
lldb_private::DataExtractor m_fpregset_data;
lldb_private::DataExtractor m_vregset_data;
+ llvm::DenseMap<uint32_t, lldb_private::DataExtractor> m_regsets_data;
bool CalculateStopInfo() override;
};
diff --git a/lldb/source/Plugins/Process/elf-core/elf-core-enums.h b/lldb/source/Plugins/Process/elf-core/elf-core-enums.h
new file mode 100644
index 00000000000..b3bddfa4f10
--- /dev/null
+++ b/lldb/source/Plugins/Process/elf-core/elf-core-enums.h
@@ -0,0 +1,55 @@
+//===-- elf-core-enums.h ----------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_ELF_CORE_ENUMS_H
+#define LLDB_ELF_CORE_ENUMS_H
+
+/// Core files PT_NOTE segment descriptor types
+
+namespace FREEBSD {
+enum {
+ NT_PRSTATUS = 1,
+ NT_FPREGSET,
+ NT_PRPSINFO,
+ NT_THRMISC = 7,
+ NT_PROCSTAT_AUXV = 16,
+ NT_PPC_VMX = 0x100
+};
+}
+
+namespace NETBSD {
+enum { NT_PROCINFO = 1, NT_AUXV, NT_AMD64_REGS = 33, NT_AMD64_FPREGS = 35 };
+}
+
+namespace OPENBSD {
+enum {
+ NT_PROCINFO = 10,
+ NT_AUXV = 11,
+ NT_REGS = 20,
+ NT_FPREGS = 21,
+};
+}
+
+namespace LINUX {
+enum {
+ NT_PRSTATUS = 1,
+ NT_FPREGSET,
+ NT_PRPSINFO,
+ NT_TASKSTRUCT,
+ NT_PLATFORM,
+ NT_AUXV,
+ NT_FILE = 0x46494c45,
+ NT_SIGINFO = 0x53494749,
+ NT_PPC_VMX = 0x100,
+ NT_PPC_VSX = 0x102,
+ NT_PRXFPREG = 0x46e62b7f,
+};
+}
+
+#endif // #ifndef LLDB_ELF_CORE_ENUMS_H
OpenPOWER on IntegriCloud