Next: Errors Reading Symbol Files, Previous: Index Files Speed Up ROCgdb, Up: ROCgdb Files [Contents][Index]
The DWARF specification documents an optional index section called ‘.debug_names’. ROCgdb can both read and create this section. However, in order to work with ROCgdb, some extensions were necessary.
ROCgdb uses an augmentation string to specify which extensions are in use and to allow support of backwards-incompatible changes in this functionality. The augmentation string has the form ‘GDBn’, where n is an integral version number of the extensions, which is incremented when the extensions are added or modified. The smallest n is 2; earlier versions of ROCgdb used just ‘GDB’ with no version number, but these versions of the index are no longer supported.
Here is a list of augmentation string versions along with the changes introduced with each version, compared to the previous version.
Specifies the use of attributes DW_IDX_GNU_internal,
DW_IDX_GNU_main, DW_IDX_GNU_language and
DW_IDX_GNU_linkage_name, described below.
Changes the semantic of the DW_IDX_parent attribute.
With ‘GDB2’, DW_IDX_parent provided an offset into the name
table. With ‘GDB3’, it now provides an offset to the index entry
of the parent, relative to the start of the entry pool region.
ROCgdb produces indexes with the augmentation string ‘GDB3’.
ROCgdb can read indexes with augmentation strings ‘GDB2’ or ‘GDB3’. ROCgdb does not support reading indexes with any other augmentation strings.
ROCgdb does not use the specified hash table. Therefore, because this hash table is optional, ROCgdb also does not write it.
ROCgdb generates and uses the following non-standard index attributes:
DW_IDX_GNU_internalThis has the value ‘0x2000’. It is a flag that, when set,
indicates that the associated entry has static linkage.
DW_IDX_GNU_mainThis has the value ‘0x2002’. It is a flag that, when set,
indicates that the associated entry is the program’s main.
DW_IDX_GNU_languageThis has the value ‘0x2003’. It is a ‘DW_LANG_’ constant, indicating the language of the associated entry.
DW_IDX_GNU_linkage_nameThis has the value ‘0x2004’. It is a flag that, when set, indicates that the associated entry is a linkage name, and not a source name.
ROCgdb also has some special handling for cases not considered in the DWARF specification.
DW_IDX_parent for a C-style enumerator does not point at
the entry for enum itself, but rather the parent of the type.
The reason for this is that C-style enumerators are injected into the
containing scope, and so their name is not qualified by the
enum; and furthermore there is no way to distinguish between
C-style enumerators and enum class-style enumerators in
‘.debug_names’.
DW_IDX_parent is omitted for any linkage name
entries that are written.
dwz.
In general, a DWARF partial unit cannot be read in isolation, but only
by reading it in the context of some other unit that references it via
DW_TAG_imported_unit.
Therefore, an ordinary definition in a partial unit is attributed to
one of the outermost containing units. This is done by referencing
this containing CU in the DW_IDX_compile_unit attribute.
A further special case applies to DW_TAG_inlined_subroutine
entries. An inlined subroutine appearing in a partial unit may be
inlined in all of the outermost compilation units that directly or
indirectly include the partial unit. Therefore, in this case,
ROCgdb will emit a separate index entry for the entry, once for
each such containing unit.
Next: Errors Reading Symbol Files, Previous: Index Files Speed Up ROCgdb, Up: ROCgdb Files [Contents][Index]