Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Add a flag to control the version of CIE that is generated. By
default gas produces CIE version 1, and this continues to be the
default after this patch.
However, a user can now provide --gdwarf-cie-version=NUMBER to switch
to either version 3 or version 4 of CIE, version 2 was never released,
and so causes an error as does any number less than 1 or greater than
4.
Producing version 4 CIE requires two new fields to be added to the
CIE, an address size field, and an segment selector field. For a flat
address space the DWARF specification indicates that the segment
selector should be 0, and the address size fields just contains the
address size in bytes. For now we support 4 or 8 byte addresses, and
the segment selector is always produced as 0. At some future time we
might need to allow targets to override this.
gas/ChangeLog:
* as.c (parse_args): Parse --gdwarf-cie-version option.
(flag_dwarf_cie_version): New variable.
* as.h (flag_dwarf_cie_version): Declare.
* dw2gencfi.c (output_cie): Switch from DW_CIE_VERSION to
flag_dwarf_cie_version.
* doc/as.texi (Overview): Document --gdwarf-cie-version.
* NEWS: Likewise.
* testsuite/gas/cfi/cfi.exp: Add new tests.
* testsuite/gas/cfi/cie-version-0.d: New file.
* testsuite/gas/cfi/cie-version-1.d: New file.
* testsuite/gas/cfi/cie-version-2.d: New file.
* testsuite/gas/cfi/cie-version-3.d: New file.
* testsuite/gas/cfi/cie-version-4.d: New file.
* testsuite/gas/cfi/cie-version.s: New file.
include/ChangeLog:
* dwarf2.h (DW_CIE_VERSION): Delete.
Change-Id: I9de19461aeb8332b5a57bbfe802953d0725a7ae8
|
|
|
|
|
|
When dumping location lists, also dump locview lists that may be
interspersed with them, and bring view pairs next to the corresponding
location list entries.
This patch supports DW_AT_GNU_locviews as a separate attribute for
DWARF4- loc_lists and split (dwo) loclists, as well as DWARF5
loclists.
It also supports, in DWARF5 loclists, the proposed
DW_LLE_GNU_view_pair loclist entry type proposed for DWARF6.
The tests use 32-bit DWARF, even on 64-bit targets, resolving offsets
to constants so as to reduce the risk that relocations be created for
them, or that the offsets be rejected as nonconstants.
The patch also adds an xfail to an unrelated test, namely dw5, so that
no unexpected fails remain on nds32*-elf, one of the tested targets.
Reviewed-by: Alan Modra <amodra@gmail.com>
for include/ChangeLog
* dwarf2.def (DW_AT_GNU_locviews): New.
* dwarf2.h (enum dwarf_location_list_entry_type): Add
DW_LLE_GNU_view_pair.
(DW_LLE_view_pair): Define.
for binutils/ChangeLog
* dwarf.h (debug_info): Add loc_views and num_loc_views.
* dwarf.c (vm1): New constant.
(print_dwarf_view): New function.
(read_and_display_attr_value): Support DW_AT_GNU_locviews.
(process_debug_info): Keep num_loc_offsets and num_loc_views
in sync.
(display_view_pair_list): New function.
(display_loc_list_dwo): Take vstart_ptr; update it. Dump
location view pairs before the range they apply to, when a
viewlist augments the loc list.
(display_loc_list): Likewise. Check view numbers in range
tests.
(display_loclists_list): Likewise. Handle view pair entries,
and warn on trailing ones.
(loc_views): New variable.
(loc_offsets_compar): Compare loc_views if loc_offsets are the
same.
(display_debug_loc): Check and sort loc_views too. Accept
loc_view as expected_start. Skip if lists and views are the
same. Dump locview list separately in order, and pass the
locview list base to each list dump function. Warn and skip
overlap and hole checking if we find loclists and locviews to
not be adjacent.
* testsuite/binutils-all/locview-1.s: New.
* testsuite/binutils-all/readelf.locview-1: New.
* testsuite/binutils-all/locview-2.s: New.
* testsuite/binutils-all/readelf.locview-2: New.
* testsuite/binutils-all/readelf.exp: Run new tests. Fix
option spelling in pr18374 fail message. XFAIL dw5 test on
nds32*-elf.
|
|
Note this brings in the interface files for libcc1/G++ as well, which
we will be needing in GDB soon anyway. That commit renamed a method
in the C interface and that required a small update to GDB's compile/
code, which I've included that in this patch to keep the tree
building.
include/ChangeLog:
2017-09-15 Pedro Alves <palves@redhat.com>
* ansidecl.h (DISABLE_COPY_AND_ASSIGN): New macro.
2017-09-12 Jiong Wang <jiong.wang@arm.com>
* dwarf2.def (DW_CFA_AARCH64_negate_ra_state): New DW_CFA_DUP.
* dwarf2.h (DW_CFA_DUP): New define.
2017-08-21 Richard Biener <rguenther@suse.de>
* simple-object.h (simple_object_copy_lto_debug_sections): New
function.
2017-05-18 Martin Liska <mliska@suse.cz>
* ansidecl.h: Define CONSTEXPR macro.
2017-05-24 Nathan Sidwell <nathan@acm.org>
* libiberty.h (ASTRDUP): Adjust cast to avoid warning.
2017-01-30 Alexandre Oliva <aoliva@redhat.com>
Introduce C++ support in libcc1.
* gcc-c-fe.def (int_type_v0): Rename from...
(int_type): ... this. Introduce new version.
(float_type_v0): Rename from...
(float_type): ... this. Introduce new version.
(char_type): New.
* gcc-c-interface.h (gcc_c_api_version): Add GCC_C_FE_VERSION_1.
(gcc_type_array): Move...
* gcc-interface.h: ... here.
* gcc-cp-fe.def: New.
* gcc-cp-interface.h: New.
2016-04-29 Oleg Endo <olegendo@gcc.gnu.org>
* longlong.h (umul_ppmm): Remove SHMEDIA checks.
(__umulsidi3, count_leading_zeros): Remove SHMEDIA implementations.
2017-09-15 Yao Qi <yao.qi@linaro.org>
Pedro Alves <palves@redhat.com>
* ansidecl.h (DISABLE_COPY_AND_ASSIGN): New macro.
2017-09-12 Jiong Wang <jiong.wang@arm.com>
* dwarf2.def (DW_CFA_AARCH64_negate_ra_state): New DW_CFA_DUP.
* dwarf2.h (DW_CFA_DUP): New define.
2017-08-21 Richard Biener <rguenther@suse.de>
* simple-object.h (simple_object_copy_lto_debug_sections): New
function.
2017-05-18 Martin Liska <mliska@suse.cz>
* ansidecl.h: Define CONSTEXPR macro.
2017-05-24 Nathan Sidwell <nathan@acm.org>
* libiberty.h (ASTRDUP): Adjust cast to avoid warning.
2017-01-30 Alexandre Oliva <aoliva@redhat.com>
Introduce C++ support in libcc1.
* gcc-c-fe.def (int_type_v0): Rename from...
(int_type): ... this. Introduce new version.
(float_type_v0): Rename from...
(float_type): ... this. Introduce new version.
(char_type): New.
* gcc-c-interface.h (gcc_c_api_version): Add GCC_C_FE_VERSION_1.
(gcc_type_array): Move...
* gcc-interface.h: ... here.
* gcc-cp-fe.def: New.
* gcc-cp-interface.h: New.
2016-04-29 Oleg Endo <olegendo@gcc.gnu.org>
* longlong.h (umul_ppmm): Remove SHMEDIA checks.
(__umulsidi3, count_leading_zeros): Remove SHMEDIA implementations.
libiberty/ChangeLog:
2017-09-15 Nathan Sidwell <nathan@acm.org>
PR demangler/82195
* cp-demangle.c (d_name): Add 'toplevel' parm. Pass to ...
(d_local_name): ... here. Parse trailing function args on nested
local_name.
(d_encoding, d_special_name, d_class_enum_type): Adjust d_name calls.
* testsuite/demangle-expected: Add tests.
2017-09-15 Richard Biener <rguenther@suse.de>
PR lto/81968
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
Iterate marking dependent sections necessary.
2017-09-15 Nathan Sidwell <nathan@acm.org>
* cp-demangle.c (is_fnqual_component_type): Reimplement using
FNQUAL_COMPONENT_CASE.
(d_encoding): Hold bare_function_type in local var.
(d_local_name): Build name in both cases and build result once.
Collapse switch-if to single conditional.
(d_local_name):
* testsuite/demangle-expected: Realign blank lines with tests.
2017-09-12 Jiong Wang <jiong.wang@arm.com>
* dwarfnames.c (DW_CFA_DUP): New define.
gdb/ChangeLog:
2017-09-15 Pedro Alves <palves@redhat.com>
* compile/compile-c-types.c (convert_enum, convert_int)
(convert_float): Adjust to refer to int_type_v0 and float_type_v0.
|
|
include/ChangeLog
2017-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2.def (DW_IDX_compile_unit, DW_IDX_type_unit, DW_IDX_die_offset)
(DW_IDX_parent, DW_IDX_type_hash, DW_IDX_lo_user, DW_IDX_hi_user)
(DW_IDX_GNU_internal, DW_IDX_GNU_external): New.
* dwarf2.h (DW_IDX, DW_IDX_DUP, DW_FIRST_IDX, DW_END_IDX): New.
(enum dwarf_name_index_attribute): Remove.
(get_DW_IDX_name): New declaration.
libiberty/ChangeLog
2017-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarfnames.c (DW_FIRST_IDX, DW_END_IDX, DW_IDX, DW_IDX_DUP): New.
|
|
* dwarf2.def: Sync with mainline gcc sources
* dwarf2.h: Likewise.
2016-12-21 Jakub Jelinek <jakub@redhat.com>
* dwarf2.def (DW_FORM_ref_sup): Renamed to ...
(DW_FORM_ref_sup4): ... this. New form.
(DW_FORM_ref_sup8): New form.
2016-10-17 Jakub Jelinek <jakub@redhat.com>
* dwarf2.h (enum dwarf_calling_convention): Add new DWARF5
calling convention codes.
(enum dwarf_line_number_content_type): New.
(enum dwarf_location_list_entry_type): Add DWARF5 DW_LLE_*
codes.
(enum dwarf_source_language): Add new DWARF5 DW_LANG_* codes.
(enum dwarf_macro_record_type): Add DWARF5 DW_MACRO_* codes.
(enum dwarf_name_index_attribute): New.
(enum dwarf_range_list_entry): New.
(enum dwarf_unit_type): New.
* dwarf2.def: Add new DWARF5 DW_TAG_*, DW_FORM_*, DW_AT_*,
DW_OP_* and DW_ATE_* entries.
2016-08-15 Jakub Jelinek <jakub@redhat.com>
* dwarf2.def (DW_AT_string_length_bit_size,
DW_AT_string_length_byte_size): New attributes.
2016-08-12 Alexandre Oliva <aoliva@redhat.com>
PR debug/63240
* dwarf2.def (DW_AT_deleted, DW_AT_defaulted): New.
* dwarf2.h (enum dwarf_defaulted_attribute): New.
|
|
|
|
include/
* dwarf2.h (enum dwarf_source_language) <DW_LANG_Rust,
DW_LANG_Rust_old>: New constants.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235643 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
DWARFv5 defines and GCC5 may output two new DW_LANG constants for the
Fortran 2003 and Fortran 2008 standards. Handle and display both in
binutils.
binutils/ChangeLog:
* dwarf.c (read_and_display_attr_value): Handle DW_LANG_Fortran03
and DW_LANG_Fortran08.
include/ChangeLog:
* dwarf2.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
http://dwarfstd.org/ShowIssue.php?issue=141121.1
|
|
|
|
gdb/ChangeLog
* dwarf2read.c (set_cu_language): Recognize DW_LANG_C11,
DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14.
include/ChangeLog
* dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
DW_LANG_C_plus_plus_14.
|
|
include/
* dwarf2.h (enum dwarf_sect): New enum type.
|
|
|
|
* dwarf2.h (enum dwarf_sect): New enum type.
|
|
|
|
|
|
|
|
(enum dwarf_attribute): Likewise.
|
|
(enum dwarf_macro_record_type): New enum. Add DW_MACRO_GNU_*.
|
|
* dwarf.c (decode_location_expression): For DW_OP_GNU_convert and
DW_OP_GNU_reinterpret, if uvalue is 0, don't add cu_offset.
Handle DW_OP_GNU_parameter_ref.
|
|
DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): New.
|
|
* dwarf2.h (dwarf_line_number_hp_sfc_ops): New enum.
|
|
* dwarf2.h (dwarf_form): Remove deprecated DW_FORM_sig8 define.
|
|
DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered,
DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites,
DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites,
DW_OP_GNU_entry_value): New.
|
|
2011-02-23 Kai Tietz <kai.tietz@onevision.com>
* dwarf2.h (_ELF_DWARF2_H): Renamed to
_DWARF2_H.
(DWARF2_External_LineInfo, DWARF2_Internal_LineInfo,
DWARF2_External_PubNames, DWARF2_Internal_PubNames,
DWARF2_External_CompUnit, DWARF2_Internal_CompUnit,
DWARF2_External_ARange, DWARF2_Internal_ARange): Removed.
ChangeLog binutils/
2011-02-23 Kai Tietz <kai.tietz@onevision.com>
* dwarf.c (read_leb128): Use bfd_vma instead of
long type.
(dwarf_vmatoa): New helper routine.
(process_extended_line_op): Use for adr bfd_vma
type and print those typed values via BFD_VMA_FMT
or via dwarf_vmatoa for localized prints.
(fetch_indirect_string): Adjust offset's type.
(decode_location_expression): Adjust argument types
and uvalue type.
(read_and_display_attr_value): Likewise.
(read_and_display_attr): Likewise.
(decode_location_expression): Adjust printf format.
(process_debug_info): Likewise.
(display_debug_lines_raw): Likewise.
(display_debug_lines_decoded): Likewise.
(display_debug_pubnames): Likewise.
(display_debug_loc): Likewise.
(display_debug_aranges): Likewise.
* dwarf.h (DWARF2_External_LineInfo,
DWARF2_Internal_LineInfo, DWARF2_External_PubNames,
DWARF2_Internal_PubNames, DWARF2_External_CompUnit,
DWARF2_Internal_CompUnit, DWARF2_External_ARange,
DWARF2_Internal_ARange): Added..
(read_leb128): Adjust return type.
|
|
* dwarf2.h (enum dwarf_calling_convention): Add DW_CC_GDB_IBM_OpenCL.
gdb/ChangeLog:
* dwarf2read.c (read_subroutine_type): Set special calling
convention flag for functions compiled by IBM XL C for OpenCL.
* ppc-sysv-tdep.c: Include "dwarf2.h"
(ppc_sysv_abi_push_dummy_call): Implement IBM OpenCL vector types
calling convention.
(do_ppc_sysv_return_value): Add FUNC_TYPE argument. Implement
IBM OpenCL vector types calling convention.
(ppc_sysv_abi_return_value): Pass through FUNC_TYPE.
(ppc_sysv_abi_broken_return_value): Likewise.
(ppc64_sysv_abi_push_dummy_call): Implement IBM OpenCL vector
types calling convention.
(ppc64_sysv_abi_return_value): Likewise.
* spu-tdep.c: Include "dwarf2.h"
(spu_return_value): Implement IBM OpenCL vector types calling
convention.
gdb/testsuite/ChangeLog:
* gdb.opencl/callfuncs.cl: New file.
* gdb.opencl/callfuncs.exp: New test.
* gdb.opencl/Makefile.in (EXECUTABLES): Add callfuncs.
|
|
|
|
|
|
* dwarf.c (decode_location_expression): Add offset_size and
dwarf_version arguments. Prefix DIE offset with 0x for
DW_OP_call{2,4,_ref}. Fix up DW_OP_call_ref operand size,
complain if in frame info section. Handle
DW_OP_GNU_implicit_pointer.
(read_and_display_attr_value, display_debug_loc,
display_debug_frames): Adjust decode_location_expression callers.
(process_debug_info): Save offset_size and dwarf_version values
into debug_information array.
* dwarf2.h (DW_OP_GNU_implicit_pointer): New.
|
|
|
|
* dwarf2.h (enum dwarf_tag): Add DW_TAG_HP_Bliss_field and
DW_TAG_HP_Bliss_field_set.
(enum dwarf_attribute): Add DW_AT_HP_prologue, DW_AT_HP_epilogue,
DW_AT_HP_unit_name, DW_AT_HP_unit_size, DW_AT_HP_widened_byte_size,
DW_AT_HP_definition_points, DW_AT_HP_default_location and
DW_AT_HP_is_result_param.
(enum dwarf_type): Add DW_ATE_HP_VAX_float, DW_ATE_HP_VAX_float_d,
DW_ATE_HP_packed_decimal, DW_ATE_HP_zoned_decimal, DW_ATE_HP_edited,
DW_ATE_HP_signed_fixed, DW_ATE_HP_unsigned_fixed,
DW_ATE_HP_VAX_complex_float and DW_ATE_HP_VAX_complex_float_d.
(enum dwarf_line_number_x_ops): Add
DW_LNE_HP_source_file_correlation.
(enum dwarf_source_language): Add DW_LANG_HP_Bliss,
DW_LANG_HP_Basic91, DW_LANG_HP_Pascal91, DW_LANG_HP_IMacro,
DW_LANG_HP_Assembler.
|
|
|
|
|
|
* dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn
field.
bfd/
* dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
(struct line_info): Add op_index field, change end_sequence type to
unsigned char.
(new_line_sorts_after): For the same address compare op_index.
(add_line_info): Add op_index argument, store it into the structure.
(decode_line_info): Complain about unknown versions of .debug_line.
Initialize maximum_ops_per_insn. Add op_index state register and
track it.
binutils/
* dwarf.c (struct State_Machine_Registers): Add op_index field,
change end_sequence type to unsigned char.
(reset_state_machine): Clear op_index.
(process_extended_line_op): For DW_LNE_set_address clear op_index.
(display_debug_lines_raw): Initialize li_max_ops_per_insn.
Track op_index state machine register and print it if
li_max_ops_per_insn is != 1.
(display_debug_lines_decoded): Likewise.
|
|
* dwarf2.h (dwarf_attribute): Add DW_AT_use_GNAT_descriptive_type.
|
|
|
|
Add DWARF attribute value for the "Borland fastcall" calling
convention.
* elf/dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.
|
|
|
|
|
|
* dwarf2.h (DW_TAG_rvalue_reference_type, DW_TAG_template_alias):
New tags.
(DW_FORM_ref_sig8): New name for DW_FORM_sig8.
(DW_AT_main_subprogram, DW_AT_data_bit_offset, DW_AT_const_expr,
DW_AT_enum_class, DW_AT_linkage_name, DW_AT_GNU_guarded_by,
DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded,
DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required,
DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature): New
attributes.
(DW_LANG_Python): New language.
binutils/
* dwarf.c (get_TAG_name): Add missing DWARF-3 and new DWARF-4 tags.
(get_FORM_name): Add new DWARF-4 forms.
(read_and_display_attr_value): Add DW_FORM_ref_sig8, DW_LANG_Python.
(get_AT_name): Add new DWARF-4 and GNU-specific attributes.
(process_debug_info): Add do_types parameter; change all callers.
Add support for .debug_types sections.
(display_debug_types): New function.
(debug_displays): Add .debug_types section.
* readelf.c (process_section_headers): Add .debug_types section.
(display_debug_section): Simplify call to streq.
|
|
|
|
|
|
* dwarf2.h (enum dwarf_tag): Add DW_TAG_type_unit.
(enum dwarf_form): Add DW_FORM_sec_offset, DW_FORM_exprloc,
DW_FORM_flag_present, DW_FORM_sig8.
(enum dwarf_attribute): Add DW_AT_signature.
|
|
|
|
|