This page is meant to document the Dwarf changes and behavior of the RHEL 4.4.2-RH and Fedora 12 compilers relative to the GCC 4.1.x-RH compilers.
- We now emit version 3 in the .debug_info CU header and .debug_line header by default
We emit a more compact DW_AT_data_member_location when possible. See http://gcc.gnu.org/PR40659
- We use DW_OP_call_frame_cfa to express DW_AT_frame_base
- For C++ and Java aggregate types we emit DW_TAG_class_type and DW_TAG_interface_type where applicable
- GCC now generates most dwarf-2 and dwarf-3 DW_OP_* codes with the exception of DW_OP_xderef{,size}, DW_OP_bit_piece and DW_OP_call_ref. DW_OP_call{2,4} are not currently generated, but will likely be generated in the near future
- GCC emits dwarf-4 DW_OP_implicit_value and DW_OP_stack_value by default
- GCC now emits DW_LANG_C99 when the flag -std=c99 or -std=gnu99 is included on the command line
It is possible to control the dwarf debug records generated by RHEL 6 and Fedora 12 compilers via the -gdwarf-{2,3,4} and -gstrict-dwarf switches. By default GCC uses -gdwarf-3 -gno-strict-dwarf which means emit DWARF-3 plus any DWARF-4 extensions that can be safely ignored by strict DWARF-3 readers. Examples of changes that are not allowed with -gstrict-dwarf would include:
- CU version number
- DW_OP_call_frame_cfa instead of a location list
- DW_FORM_* values
We expect to update this page as further Dwarf changes are backported to RHEL and Fedora compilers.