* dwarf2read.c: Whitespace fixes for DWP file format documentation,

and fix header docs.
This commit is contained in:
Doug Evans 2013-06-06 23:51:09 +00:00
parent 48e65d55bb
commit d2415c6cf4
2 changed files with 47 additions and 37 deletions

View File

@ -1,3 +1,8 @@
2013-06-06 Doug Evans <dje@google.com>
* dwarf2read.c: Whitespace fixes for DWP file format documentation,
and fix header docs.
2013-06-05 Doug Evans <dje@google.com>
Keith Seitz <keiths@redhat.com>

View File

@ -8867,29 +8867,34 @@ create_dwo_cu (struct dwo_file *dwo_file)
/* DWP file .debug_{cu,tu}_index section format:
[ref: http://gcc.gnu.org/wiki/DebugFissionDWP]
DWP Version 1:
Both index sections have the same format, and serve to map a 64-bit
signature to a set of section numbers. Each section begins with a header,
followed by a hash table of 64-bit signatures, a parallel table of 32-bit
indexes, and a pool of 32-bit section numbers. The index sections will be
aligned at 8-byte boundaries in the file.
The index section header contains two unsigned 32-bit values (using the
byte order of the application binary):
The index section header consists of:
N, the number of compilation units or type units in the index
M, the number of slots in the hash table
V, 32 bit version number
-, 32 bits unused
N, 32 bit number of compilation units or type units in the index
M, 32 bit number of slots in the hash table
(We assume that N and M will not exceed 2^32 - 1.)
Numbers are recorded using the byte order of the application binary.
We assume that N and M will not exceed 2^32 - 1.
The size of the hash table, M, must be 2^k such that 2^k > 3*N/2.
The hash table begins at offset 8 in the section, and consists of an array
The hash table begins at offset 16 in the section, and consists of an array
of M 64-bit slots. Each slot contains a 64-bit signature (using the byte
order of the application binary). Unused slots in the hash table are 0.
(We rely on the extreme unlikeliness of a signature being exactly 0.)
The parallel table begins immediately after the hash table
(at offset 8 + 8 * M from the beginning of the section), and consists of an
(at offset 16 + 8 * M from the beginning of the section), and consists of an
array of 32-bit indexes (using the byte order of the application binary),
corresponding 1-1 with slots in the hash table. Each entry in the parallel
table contains a 32-bit index into the pool of section numbers. For unused
@ -8913,7 +8918,7 @@ create_dwo_cu (struct dwo_file *dwo_file)
to stop at an unused slot or find the match.
The pool of section numbers begins immediately following the hash table
(at offset 8 + 12 * M from the beginning of the section). The pool of
(at offset 16 + 12 * M from the beginning of the section). The pool of
section numbers consists of an array of 32-bit words (using the byte order
of the application binary). Each item in the array is indexed starting
from 0. The hash table entry provides the index of the first section