From 205afe679855a4ce8149cdaa94d3f0868ce796dc Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 6 Feb 2015 21:38:51 +0000 Subject: Import LLDB as of upstream SVN r225923 (git 2b588ecd) This corresponds with the branchpoint for the 3.6 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL --- source/Plugins/Process/elf-core/ProcessElfCore.cpp | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'source/Plugins/Process/elf-core/ProcessElfCore.cpp') diff --git a/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/source/Plugins/Process/elf-core/ProcessElfCore.cpp index 566816783c7ee..fb39d7318a5a5 100644 --- a/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -405,14 +405,18 @@ enum { NT_AUXV }; +namespace FREEBSD { + enum { - NT_FREEBSD_PRSTATUS = 1, - NT_FREEBSD_FPREGSET, - NT_FREEBSD_PRPSINFO, - NT_FREEBSD_THRMISC = 7, - NT_FREEBSD_PROCSTAT_AUXV = 16 + NT_PRSTATUS = 1, + NT_FPREGSET, + NT_PRPSINFO, + NT_THRMISC = 7, + NT_PROCSTAT_AUXV = 16 }; +} + // Parse a FreeBSD NT_PRSTATUS note - see FreeBSD sys/procfs.h for details. static void ParseFreeBSDPrStatus(ThreadData &thread_data, DataExtractor &data, @@ -420,6 +424,7 @@ ParseFreeBSDPrStatus(ThreadData &thread_data, DataExtractor &data, { lldb::offset_t offset = 0; bool lp64 = (arch.GetMachine() == llvm::Triple::mips64 || + arch.GetMachine() == llvm::Triple::ppc64 || arch.GetMachine() == llvm::Triple::x86_64); int pr_version = data.GetU32(&offset); @@ -516,20 +521,20 @@ ProcessElfCore::ParseThreadContextsFromNoteSegment(const elf::ELFProgramHeader * m_os = llvm::Triple::FreeBSD; switch (note.n_type) { - case NT_FREEBSD_PRSTATUS: + case FREEBSD::NT_PRSTATUS: have_prstatus = true; ParseFreeBSDPrStatus(*thread_data, note_data, arch); break; - case NT_FREEBSD_FPREGSET: + case FREEBSD::NT_FPREGSET: thread_data->fpregset = note_data; break; - case NT_FREEBSD_PRPSINFO: + case FREEBSD::NT_PRPSINFO: have_prpsinfo = true; break; - case NT_FREEBSD_THRMISC: + case FREEBSD::NT_THRMISC: ParseFreeBSDThrMisc(*thread_data, note_data); break; - case NT_FREEBSD_PROCSTAT_AUXV: + case FREEBSD::NT_PROCSTAT_AUXV: // FIXME: FreeBSD sticks an int at the beginning of the note m_auxv = DataExtractor(segment_data, note_start + 4, note_size - 4); break; -- cgit v1.2.3