[Lldb-commits] [PATCH] D39681: Implement core dump debugging for PPC64le
Alexandre Yukio Yamashita via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 14 12:14:00 PST 2017
alexandreyy added inline comments.
================
Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:14
+/// Core files PT_NOTE segment descriptor types
+enum {
+ NT_PRSTATUS = 1,
----------------
krytarowski wrote:
> alexandreyy wrote:
> > krytarowski wrote:
> > > No namespace here?
> > I think these constants are used for multiple OSs.
> > Am I correct?
> > Do you have a suggestion for a namespace?
> There is rumor that they came from SVR4.. but I don't have the specs to make sure.
>
> Multiple in this case does not mean "all". This is not true for at least NetBSD.
I can remove these constants and modify the first "if" in ParseThreadContextsFromNoteSegment to:
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);
What do you think?
But NT_PRSTATUS and NT_PRPSINFO have the same value for Linux and FreeBSD .
https://reviews.llvm.org/D39681
More information about the lldb-commits
mailing list