summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2015-01-06 22:13:48 +0000
committerEd Maste <emaste@freebsd.org>2015-01-06 22:13:48 +0000
commit0b589f1bd9db892a7815fdb5729be8424165e2b8 (patch)
tree02663904f9540c9f6cc4a3a41fa93df07f4cdabb
parentad8ef9f73611b2bc0c021beb60d709d78abed713 (diff)
Put FreeBSD note types in their own namespace
Note types are inherently OS-specific, but some note type names are common to both FreeBSD and Linux. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@225299 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--source/Plugins/Process/elf-core/ProcessElfCore.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/source/Plugins/Process/elf-core/ProcessElfCore.cpp
index 38e092f5d..fb39d7318 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,
@@ -517,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;