Normal and partial compilation unit entries
A normal compilation unit is represented by a debugging information entry with the tag
DW_TAG_compile_unit (known as CU DIE hence forth). Each CU DIE may have a
DW_AT_stmt_list attribute whose value is a section offset to the line number
information for this compilation unit. A separate line number table is generated for each source
view, and the line number table that is associated with the CU DIE is the default source view (user
source).
For each additional source view (for example, Assembly View), there is a
DW_TAG_IBM_src_view DIE. The parent of this DIE is the CU DIE. The DW_TAG_IBM_src_view DIE has the following attributes:- A
DW_AT_nameattribute, whose value is a null-terminated string containing the name of the source view. - A
DW_AT_stmt_listattribute, whose value is a section offset to the line number information for this source view. - A
DW_AT_IBM_src_fileattribute, whose value is a DIE section offset to the.debug_srcfilessection. The referenced source file DIE contains additional information about the primary source file within the source view.
A CU DIE may have the following attributes:
- A
DW_AT_IBM_alt_srcviewattribute, which points to theDW_TAG_IBM_src_viewDIE. - A
DW_AT_IBM_branch_flagsattribute, which is a flag whose presence indicates that the program's branch points are identified by the bits insysattr_flagon the line number entries. - A
DW_AT_IBM_charsetattribute, which is a string representing the codeset that is used by the compiler to interpret the identifier names within this compilation unit. - A
DW_AT_IBM_has_baselistattribute, which is a flag whose presence indicates that at least one base location entry exists in the compilation unit. - A
DW_AT_IBM_has_xrefattribute, which is a flag whose presence indicates that the producer supports the generation of cross-reference information. For example, the producer can produce.debug_xrefsection if cross-reference information is available. - A
DW_AT_IBM_line_reorderedattribute, which is a flag whose presence indicates that the execution order of the statements within the line number program may not match the flow of the original source program. (This only applies to those statements without synchronization flag). - A
DW_AT_IBM_set_unreliableattribute, which is a flag whose presence indicates that when a debugger is stopped on an executable statement, it cannot reliably modify the content of variable and have the new value reflected for the rest of the execution. - A
DW_AT_IBM_sync_pointattribute, which is a flag indicating that when a debugger is stopped on an executable statement, it cannot reliably modify the content of a variable and have the new value reflected for the rest of the execution. - A
DW_AT_identifier_caseattribute, whose integer constant value is a code describing the treatment of identifiers within this compilation unit. - A
DW_AT_linkage_nameattribute, whose value is a null-terminated string describing the program name that is associated with the compilation unit. For COBOL, this contains the program-id name that is specified in the source program. - A
DW_AT_use_UTF8attribute, which is a flag whose presence indicates that all strings (such as the names of declared entities in the source program) are represented using the UTF-8 representation.
See the following DWARF samples:
DWARF sample:
.debug_info$1: DW_TAG_compile_unit
DW_AT_stmt_list (...)
DW_AT_low_pc (...)
DW_AT_high_pc (...)
DW_AT_IBM_alt_srcview (...)
$2: DW_TAG_IBM_src_view
DW_AT_name (Assembly View)
DW_AT_stmt_list (...)
DW_AT_IBM_src_file ($5)
DWARF sample:
.debug_srcfiles$5: DW_TAG_IBM_src_file
DW_AT_name (Assembly View)
DW_AT_IBM_src_type (DW_SFT_compiler_generated)
DW_AT_IBM_src_text (...)
DW_AT_IBM_md5 (0123456789abcdef0123456789abcdef)
DW_AT_IBM_src_attr (...)