forked from OSchip/llvm-project
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. llvm-svn: 225299
This commit is contained in:
parent
6239ebc1c2
commit
b8602af602
|
@ -405,14 +405,18 @@ enum {
|
||||||
NT_AUXV
|
NT_AUXV
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace FREEBSD {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NT_FREEBSD_PRSTATUS = 1,
|
NT_PRSTATUS = 1,
|
||||||
NT_FREEBSD_FPREGSET,
|
NT_FPREGSET,
|
||||||
NT_FREEBSD_PRPSINFO,
|
NT_PRPSINFO,
|
||||||
NT_FREEBSD_THRMISC = 7,
|
NT_THRMISC = 7,
|
||||||
NT_FREEBSD_PROCSTAT_AUXV = 16
|
NT_PROCSTAT_AUXV = 16
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Parse a FreeBSD NT_PRSTATUS note - see FreeBSD sys/procfs.h for details.
|
// Parse a FreeBSD NT_PRSTATUS note - see FreeBSD sys/procfs.h for details.
|
||||||
static void
|
static void
|
||||||
ParseFreeBSDPrStatus(ThreadData &thread_data, DataExtractor &data,
|
ParseFreeBSDPrStatus(ThreadData &thread_data, DataExtractor &data,
|
||||||
|
@ -517,20 +521,20 @@ ProcessElfCore::ParseThreadContextsFromNoteSegment(const elf::ELFProgramHeader *
|
||||||
m_os = llvm::Triple::FreeBSD;
|
m_os = llvm::Triple::FreeBSD;
|
||||||
switch (note.n_type)
|
switch (note.n_type)
|
||||||
{
|
{
|
||||||
case NT_FREEBSD_PRSTATUS:
|
case FREEBSD::NT_PRSTATUS:
|
||||||
have_prstatus = true;
|
have_prstatus = true;
|
||||||
ParseFreeBSDPrStatus(*thread_data, note_data, arch);
|
ParseFreeBSDPrStatus(*thread_data, note_data, arch);
|
||||||
break;
|
break;
|
||||||
case NT_FREEBSD_FPREGSET:
|
case FREEBSD::NT_FPREGSET:
|
||||||
thread_data->fpregset = note_data;
|
thread_data->fpregset = note_data;
|
||||||
break;
|
break;
|
||||||
case NT_FREEBSD_PRPSINFO:
|
case FREEBSD::NT_PRPSINFO:
|
||||||
have_prpsinfo = true;
|
have_prpsinfo = true;
|
||||||
break;
|
break;
|
||||||
case NT_FREEBSD_THRMISC:
|
case FREEBSD::NT_THRMISC:
|
||||||
ParseFreeBSDThrMisc(*thread_data, note_data);
|
ParseFreeBSDThrMisc(*thread_data, note_data);
|
||||||
break;
|
break;
|
||||||
case NT_FREEBSD_PROCSTAT_AUXV:
|
case FREEBSD::NT_PROCSTAT_AUXV:
|
||||||
// FIXME: FreeBSD sticks an int at the beginning of the note
|
// FIXME: FreeBSD sticks an int at the beginning of the note
|
||||||
m_auxv = DataExtractor(segment_data, note_start + 4, note_size - 4);
|
m_auxv = DataExtractor(segment_data, note_start + 4, note_size - 4);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue