https://sourceware.org/bugzilla/show_bug.cgi?id=33416

            Bug ID: 33416
           Summary: Skip the old note segment in illumos core file
           Product: binutils
           Version: 2.44
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 16333
  --> https://sourceware.org/bugzilla/attachment.cgi?id=16333&action=edit
skip the notes0 segment of illumos core files

On GDB I see problems with reading core files written on illumos (checked
distros OmniosCE and Openindiana).
I could find out that the reason is the ancient structure of the illumos core
files, which still contains an 2 decades old notes segment AND an new note
segment.

The proposed fix here is to skip the notes0 segment with the old proc content.

The current core file content is described here:
https://www.illumos.org/man/5/core

The proposed fix skips the notes0 segment. I tested this on GDB 16.3 source.
I do not know if the name "CORE" is still used by other OS's. So I still test
for the name "CORE" and if there the content type NT_PRPSINFO exit the loop.

Solaris 11.4 has removed the old segment already:
https://docs.oracle.com/cd/E88353_01/html/E37852/core-5.html says "Prior to
Oracle Solaris 11.4, a core file contained two NOTE sections, the extra one
containing structures defined in the obsolete <sys/old_procfs.h> header file
for the old ioctl()-based /proc interface. Programs should recognize and skip
this old NOTE segment. It can be recognized by the presence of entries with
entry name "CORE" and with these note types:"

More details was discussed first on
https://sourceware.org/bugzilla/show_bug.cgi?id=33258

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to