The .debug_info section of an ELF contains information generated by compilers to describe the source code while debugging by keeping symbols and its type, scope, file, line number, etc. The .debug_info[1] section is one of the main components of DWARF[2] [3] debug info files.[4] This is generated by a compiler when -g switch or its variants are used.
Section Name | Description |
---|---|
.debug_types | Contains the non-trivial types. Stored as a hash structure so that duplicate type definition can be removed easily. |
.debug_str | Contains strings that are not placed in the .debug_info and .debug_types sections. The linker merges the string tables to eliminate duplicates. |
.debug_aranges | Contain range lists to define what pieces of a program's text belong to which subprograms and compilation units. |
.debug_loc | Contain lists of expressions that describe to the debugger the location of a variable based on the PC value. |
.debug_line | Contain a description of the mapping from PC values to source locations. |
.debug_abbrev | Provide the definitions for abbreviation codes used in describing the debug info in the .debug_info and .debug_types sections. |
.debug_pubnames | Is an index to help fetching of symbol debug information without having to scan object files. |
.debug_pubtypes | Is an index to help fetching of type information. |