Core/NG auxiliary information (notes)
Besides a memory dump, a core file contains auxiliary information. Informally, auxiliary information is state that does not reside in memory. In ELF core files the auxiliary information is stored in sections of PT_NOTES. We therefore call the auxiliary information notes from now on. Different core file formats will store the auxiliary information differently.
The main problem with notes is that they can vary greatly. That is, platforms may have notes that are specific to the platform. Also, options and settings may control the amount of information that is being stored in a core file, causing variation even for a single platforms. Lastly, operating system evolution causes a change in notes. For example, with the introduction of 1x1 and MxN threading, core files had to contain multiple register contexts.
This page is used as a scratch pad for thoughts about how to construct notes so that it is extendable, flexible and most of all portable.
Notes contain of many pieces of information. Process ID, thread IDs, signal number(s) and register sets are all part of it. Each piece of information is considered an independent entity. This means that its relation to another piece of information is undefined, and also that its inclusion in a note is independent of any other piece of information. This leads to a definition where a piece of information needs to be identifyable. It also leads to a definition that's highly flexible and extendable.
A piece of information consists of the following elements:
- An ID, used to identify the piece of information
- An alignment specification, used to make sure that the information is naturally aligned in order to improve access flexibility
- A size, used to record the size of the piece of information
- A value, which is the piece of information itself
Alignment of a piece of information is only guaranteed if the container holding the notes can be aligned and when the alignment of the container is the maximum of the alignment of each piece of information.
The ID, alignment and size elements together form the tag or label of the piece of information. The tag or label together with the value element is the tuple that represents the piece of information in the notes. As such, notes are a sequence of tuples.