Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r267494
|
|
With -gnateS, the Ada compiler sets itself up to output discriminators
for different instantiations of generics, but the middle and back ends
have lacked support for that. This patch introduces the missing bits,
translating the GNAT-internal representation of the per-file instance
map to an instance_table that maps decls to instance discriminators.
From: Alexandre Oliva <oliva@adacore.com>, Olivier Hainque <hainque@adacore.com>
for gcc/ChangeLog
* debug.h (decl_to_instance_map_t): New type.
(decl_to_instance_map): Declare.
(maybe_create_decl_to_instance_map): New inline function.
* final.c (bb_discriminator, last_bb_discriminator): New statics,
to track basic block discriminators.
(final_start_function_1): Initialize them.
(final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
bb_discriminator.
(decl_to_instance_map): New variable.
(map_decl_to_instance, maybe_set_discriminator): New functions.
(notice_source_line): Set discriminator.
for gcc/ada/ChangeLog
* trans.c: Include debug.h.
(file_map): New static variable.
(gigi): Set it. Create decl_to_instance_map when needed.
(Subprogram_Body_to_gnu): Pass gnu_subprog_decl to...
(Sloc_to_locus): ... this. Add decl parm, map it to instance.
* gigi.h (Sloc_to_locus): Adjust declaration.
for gcc/testsuite/ChangeLog
* gnat.dg/dinst.adb: New.
* gnat.dg/dinst_pkg.ads, gnat.dg/dinst_pkg.adb: New.
Co-Authored-By: Olivier Hainque <hainque@adacore.com>
From-SVN: r263182
|
|
* common.opt (gas-loc-support, gas-locview-support): New.
(ginline-points, ginternal-reset-location-views): New.
* doc/invoke.texi: Document them. Use @itemx where intended.
(gvariable-location-views): Adjust.
* target.def (reset_location_view): New.
* doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
(TARGET_RESET_LOCATION_VIEW): New.
* doc/tm.texi: Rebuilt.
* dwarf2out.c (dwarf2out_default_as_loc_support): New.
(dwarf2out_default_as_locview_support): New.
(output_asm_line_debug_info): Use option variables.
(dwarf2out_maybe_output_loclist_view_pair): Likewise.
(output_loc_list): Likewise.
(add_high_low_attributes): Check option variables.
Don't output entry view attribute in strict mode.
(gen_inlined_subroutine_die): Check option variables.
(dwarf2out_inline_entry): Likewise.
(init_sections_and_labels): Likewise.
(dwarf2out_early_finish): Likewise.
(maybe_reset_location_view): New, from...
(dwarf2out_var_location): ... here. Call it.
* debug.h (dwarf2out_default_as_loc_support): Declare.
(dwarf2out_default_as_locview_support): Declare.
* hooks.c (hook_int_rtx_insn_0): New.
* hooks.h (hook_int_rtx_insn_0): Declare.
* toplev.c (process_options): Take -gas-loc-support and
-gas-locview-support from dwarf2out. Enable
-gvariable-location-views by default only with locview
assembler support. Enable -ginternal-reset-location-views by
default only if the target defines the corresponding hook.
Enable -ginline-points by default if location views are
enabled; force it disabled if statement frontiers are
disabled.
* tree-inline.c (expand_call_inline): Check option variables.
* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
From-SVN: r257631
|
|
This commit adds the -fmacro-prefix-map option that allows remapping of file
names in __FILE__, __BASE_FILE__, and __builtin_FILE(), similar to how
-fdebug-prefix-map allows to do the same for debug information.
Additionally, it adds -ffile-prefix-map which can be used to specify both
mappings with a single option (and, should we need to add more -f*-prefix-map
options in the future, those as well).
libcpp/ChangeLog:
2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
PR other/70268
* include/cpplib.h (cpp_callbacks::remap_filename): New callback.
* libcpp/macro.c (_cpp_builtin_macro_text): Call remap_filename for
__FILE__ and __BASE_FILE__.
gcc/ChangeLog:
2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
PR other/70268
* common.opt: (-ffile-prefix-map): New option.
* opts.c (common_handle_option): Defer it.
* opts-global.c (handle_common_deferred_options): Handle it.
* debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
* file-prefix-map.h: New file.
(remap_debug_filename, add_debug_prefix_map): ...here.
(add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
* final.c (debug_prefix_map, add_debug_prefix_map
remap_debug_filename): Move to...
* file-prefix-map.c: New file.
(file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
generalize, get rid of alloca(), use strrchr() instead of strchr().
(add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
Implement in terms of add_prefix_map().
(remap_macro_filename, remap_debug_filename): Implement in term of
remap_filename().
* Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
* builtins.c (fold_builtin_FILE): Call remap_macro_filename().
* dbxout.c: Include file-prefix-map.h.
* varasm.c: Likewise.
* vmsdbgout.c: Likewise.
* xcoffout.c: Likewise.
* dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
* doc/cppopts.texi (-fmacro-prefix-map): Document.
* doc/invoke.texi (-ffile-prefix-map): Document.
(-fdebug-prefix-map): Update description.
gcc/c-family/ChangeLog:
2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
PR other/70268
* c-family/c.opt (-fmacro-prefix-map): New option.
* c-family/c-opts.c (c_common_handle_option): Handle it.
* c-family/c-lex.c (init_c_lex): Set remap_filename cpp callback.
* c-family/c-ppoutput.c (init_pp_output): Likewise.
gcc/testsuite/ChangeLog:
2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
PR other/70268
* c-c++-common/ffile-prefix-map.c: New test.
* c-c++-common/fmacro-prefix-map.c: New test.
* c-c++-common/cpp/ffile-prefix-map.c: New test.
* c-c++-common/cpp/fmacro-prefix-map.c: New test.
From-SVN: r256847
|
|
From-SVN: r256169
|
|
The inline_entry hook will be given a definition in a later patch.
for gcc/ChangeLog
* debug.h (gcc_debug_hooks): Add inline_entry.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
* debug.c (do_nothing_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dwarf2out.c (dwarf2_debug_hooks): Likewise.
(dwarf2_lineno_debug_hooks): Likewise.
From-SVN: r255570
|
|
PR lto/81351
* debug.h (dwarf2out_do_eh_frame): Declare.
* dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
(dwarf2out_do_frame): Use it.
(dwarf2out_do_cfi_asm): Likewise.
* dwarf2out.c (dwarf2out_frame_finish): Likewise.
(dwarf2out_assembly_start): Likewise.
(dwarf2out_begin_prologue): Fix comment.
* toplev.c (compile_file): Always call dwarf2out_frame_finish
if the target needs either debug or unwind DWARF2 info.
* lto-opts.c (lto_write_options): Do not save -fexceptions,
-fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
-ftrapping-math, -ftrapv and -fwrapv.
From-SVN: r254697
|
|
gcc/
* Makefile.in (OBJS): Delete sdbout.o.
(GTFILES): Delete $(srcdir)/sdbout.c.
* debug.h: Delete sdb_debug_hooks.
* final.c: Delete sdbout.h include.
(final_scan_insn): Delete SDB_DEBUG check.
(rest_of_clean_state): Likewise.
* output.h: Delete sdb_begin_function_line.
* sdbout.c: Delete.
* sdbout.h: Delete.
* toplev.c: Delete sdbout.h include.
(process_options): Delete SDB_DEBUG check.
* tree-core.h (tree_type_common): Delete pointer field of
tree_type_symtab.
* tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
TYPE_SYMTAB_POINTER.
* tree.h (TYPE_SYMTAB_POINTER): Delete.
(TYPE_SYMTAB_IS_POINTER): Delete.
(TYPE_SYMTAB_IS_DIE): Renumber.
* xcoffout.c: Refer to former sdbout.c file.
(xcoffout_begin_prologue): Use past tense for sdbout.c reference.
* doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
* doc/invoke.texi (SEEALSO): Delete adb and sdb references.
(Debugging Options): Delete -gcoff.
(-gstabs): Delete SDB reference.
(-gcoff): Delete.
(-gcoff@var{level}): Delete.
* doc/passes.texi (Debugging information output): Delete SDB and
sdbout.c references.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
(SDB and DWARF): Change node name to DWARF and delete SDB and COFF
references.
(DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
(PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
(SDB_DEBUGGING_INFO): Delete.
(PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
* target.def (output_source_filename): Delete COFF reference.
* common.opt (gcoff): Delete.
(gxcoff+): Update Negative chain.
* defaults.h: Delete all references to SDB_DEBUGGING_INFO and
SDB_DEBUG.
* dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
* flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
* function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
and SDB references.
(expand_function_start): Change sdb reference to past tense.
(expand_function_end): Change sdb reference to past tense.
* gcc.c (cpp_unique_options): Delete gcoff3 reference.
* opts.c (debug_type_names): Delete coff entry.
(common_handle_option): Delete OPT_gcoff case.
* system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
* config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
* config/cris/cris.h: Delete SDB reference in comment.
* config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
(ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
* config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
* config/i386/i386.c (svr4_dbx_register_map): Change SDB references
to past tense.
(ix86_expand_prologue): Likewise.
* config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
* config/ia64/ia64.h: Likewise.
* config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
* config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
support.
* config/mmix/mmix.h: Likewise.
* config/nds32/nds32.c: Likewise.
* config/stormy/storym16.h: Likewise.
* config/visium/visium.h: Likewise.
* config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
gcc/fortran/
* invoke.texi: Delete adb and sdb references.
gccc/testsuite/
* lib/gcc-dg.exp (gcc-dg-debug-runtest): Delete -gcoff.
* lib/gfortran-dg.exp (gfortran-dg-debug-runtest): Delete
-gcoff.
From-SVN: r254206
|
|
2017-08-21 Richard Biener <rguenther@suse.de>
include/
* simple-object.h (simple_object_copy_lto_debug_sections): New
function.
libiberty/
* simple-object-common.h (struct simple_object_functions): Add
copy_lto_debug_sections hook.
* simple-object.c: Include fcntl.h.
(handle_lto_debug_sections): New helper function.
(simple_object_copy_lto_debug_sections): New function copying
early LTO debug sections to regular debug sections in a new file.
(simple_object_start_write): Handle NULL segment_name.
* simple-object-coff.c (simple_object_coff_functions): Adjust
for not implemented copy_lto_debug_sections hook.
* simple-object-mach-o.c (simple_object_mach_o_functions): Likewise.
* simple-object-xcoff.c (simple_object_xcoff_functions): Likewise.
* simple-object-elf.c (SHT_NULL, SHT_SYMTAB, SHT_RELA, SHT_REL,
SHT_GROUP): Add various sectopn header types.
(SHF_EXCLUDE): Add flag.
(Elf32_External_Sym, Elf64_External_Sym): Add symbol struct.
(ELF_ST_BIND, ELF_ST_TYPE, ELF_ST_INFO): Add accessors.
(STT_OBJECT, STT_FUNC, STT_TLS, STT_GNU_IFUNC): Add Symbol types.
(STV_DEFAULT): Add symbol visibility.
(SHN_COMMON): Add special section index name.
(struct simple_object_elf_write): New.
(simple_object_elf_start_write): Adjust for new private data.
(simple_object_elf_write_shdr): Pass in values for all fields
we write.
(simple_object_elf_write_to_file): Adjust. Copy from recorded
section headers if requested.
(simple_object_elf_release_write): Release private data.
(simple_object_elf_copy_lto_debug_sections): Copy and rename sections
as denoted by PFN and all their dependences, symbols and relocations
to the empty destination file.
(simple_object_elf_functions): Adjust for copy_lto_debug_sections hook.
gcc/
* debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
register_external_die hooks.
(debug_false_tree_charstarstar_uhwistar): Declare.
(debug_nothing_tree_charstar_uhwi): Likewise.
* debug.c (do_nothing_debug_hooks): Adjust.
(debug_false_tree_charstarstar_uhwistar): New do nothing.
(debug_nothing_tree_charstar_uhwi): Likewise.
* dbxout.c (dbx_debug_hooks): Adjust.
(xcoff_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dwarf2out.c (macinfo_label_base): New global.
(dwarf2out_register_external_die): New function for the
register_external_die hook.
(dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
(dwarf2_debug_hooks): Use them.
(dwarf2_lineno_debug_hooks): Adjust.
(struct die_struct): Add with_offset flag.
(DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
defining section names for the early LTO debug variants.
(reset_indirect_string): New helper.
(add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
(print_dw_val): Add support for offsetted symbol references.
(get_ultimate_context): Split out from is_cxx.
(is_cxx): Use get_ultimate_context.
(is_fortran): Add decl overload.
(compute_comp_unit_symbol): Split out worker from
compute_section_prefix.
(compute_section_prefix): Call compute_comp_unit_symbol and
set comdat_type_p here.
(output_die): Skip DIE symbol output for the LTO added one.
Handle DIE symbol references with offset.
(output_comp_unit): Guard section name mangling properly.
For LTO debug sections emit a symbol at the section beginning
which we use to refer to its DIEs.
(add_abstract_origin_attribute): For DIEs registered via
dwarf2out_register_external_die directly refer to the early
DIE rather than indirectly through the shadow one we created.
Remove obsolete call to dwarf2out_abstract_function for
non-function/block origins.
(gen_array_type_die): When generating early LTO debug do
not emit DW_AT_string_length.
(gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
late when in LTO. As suggested place a gcc_unreachable for
the DECL_ABSTRACT_P case.
(gen_subprogram_die): Avoid another specification DIE
for early built declarations/definitions for the late LTO case.
(gen_variable_die): Add type references for late duplicated VLA dies
when in late LTO.
(gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
we have the abstract instance already.
(process_scope_var): Adjust decl DIE contexts in LTO which
first puts them in limbo.
(gen_decl_die): Do not generate type DIEs late apart from
types for VLAs or for decls we do not yet have a DIE. Do not
call dwarf2out_abstract_function late.
(dwarf2out_early_global_decl): Make sure to create DIEs
for abstract instances of a decl first.
(dwarf2out_late_global_decl): Adjust comment.
(output_macinfo_op): With multiple macro sections use
macinfo_label_base to distinguish labels.
(output_macinfo): Likewise. Update macinfo_label_base.
Pass in the line info label.
(note_variable_value_in_expr): When generating LTO resolve
all variable values here by generating DIEs as needed.
(init_sections_and_labels): Add early LTO debug flag parameter
and generate different sections and names if set. Add generation
counter for the labels so we can have multiple of them.
(reset_dies): Helper to allow DIEs to be output multiple times.
(dwarf2out_finish): When outputting DIEs to the fat part of an
LTO object first reset DIEs.
(dwarf2out_early_finish): Output early DIEs when generating LTO.
(modified_type_die): Check for decl_ultimate_origin being self
before recursing.
(gen_type_die_with_usage): Likewise.
(gen_typedef_die): Allow decl_ultimate_origin being self.
(set_decl_abstract_flags): Remove.
(set_block_abstract_flags): Likewise.
(dwarf2out_abstract_function): Treat the early generated DIEs
as the abstract copy and only add DW_AT_inline and
DW_AT_artificial here and call set_decl_origin_self.
If the DIE has an abstract origin don't do anything.
* tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
if we have none yet (Go fails to build one, PR78628).
(variably_modified_type_p): Prevent endless recursion for Ada
cyclic pointer types.
* lto-streamer-in.c: Include debug.h.
(dref_queue): New global.
(lto_read_tree_1): Stream in DIE references.
(lto_input_tree): Register DIE references.
(input_function): Stream DECL_DEBUG_ARGS.
* lto-streamer-out.c: Include debug.h.
(lto_write_tree_1): Output DIE references.
(DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
(output_function): Stream DECL_DEBUG_ARGS.
* tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
Stream DECL_ABSTRACT_ORIGIN.
* tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
(write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
DECL_CONTEXT for file-scope decls.
* lto-streamer.h (struct dref_entry): Declare.
(dref_queue): Likewise.
* cfgexpand.c (pass_expand::execute): Do not call the
outlining_inline_function hook here.
* lto-wrapper.c (debug_obj): New global.
(tool_cleanup): Unlink it if required.
(debug_objcopy): New function.
(run_gcc): Handle early debug sections in the IL files by
extracting them to separate files, partially linkin them and
feeding the result back as result to the linker.
* config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
sections into a separate segment.
* config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
segments.
(darwin_asm_dwarf_section): Likewise.
(darwin_asm_output_dwarf_offset): Likewise.
* config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
lto/
* lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
(lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
TYPE_DECL debug processing, register DIE references from
prevailing SCCs with the debug machinery.
(lto_section_with_id): Handle LTO debug sections.
libstdc++/
* testsuite/libstdc++-prettyprinters/prettyprinters.exp: Run all
tests with -flto as well if supported.
testsuite/
* c-c++-common/asan/global-overflow-1.c: Adjust diagnostic location
regex to handle the LTO case.
* c-c++-common/asan/heap-overflow-1.c: Likewise.
* c-c++-common/asan/misalign-1.c: Likewise.
* c-c++-common/asan/misalign-2.c: Likewise.
* c-c++-common/asan/null-deref-1.c: Likewise.
* c-c++-common/asan/stack-overflow-1.c: Likewise.
* c-c++-common/asan/strncpy-overflow-1.c: Likewise.
* c-c++-common/asan/use-after-free-1.c: Likewise.
* c-c++-common/asan/alloca_big_alignment.c: Likewise.
* c-c++-common/asan/alloca_detect_custom_size.c: Likewise.
* c-c++-common/asan/alloca_overflow_partial.c: Likewise.
* c-c++-common/asan/alloca_overflow_right.c: Likewise.
* c-c++-common/asan/alloca_underflow_left.c: Likewise.
* g++.dg/asan/large-func-test-1.C: Likewise.
* gfortran.dg/save_6.f90: Add -flto -g variant of save_5.f90.
From-SVN: r251220
|
|
imported_module_or_decl hook.
* debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
to imported_module_or_decl hook.
(debug_nothing_tree_tree_tree_bool): Remove.
(debug_nothing_tree_tree_tree_bool_bool): New declaration.
* debug.c (do_nothing_debug_hooks): Use
debug_nothing_tree_tree_tree_bool_bool instead of
debug_nothing_tree_tree_tree_bool.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
(gen_namespace_die): Add DW_AT_export_symbols attribute if
langhook wants it.
(dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
if true, -gdwarf-5 and decl will have DW_AT_export_symbols
attribute, don't add anything.
cp/
* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle
DW_AT_export_symbols.
* name-lookup.c (emit_debug_info_using_namespace): Add IMPLICIT
argument, pass it through to the debug hook.
(finish_namespace_using_directive): Adjust
emit_debug_info_using_namespace caller.
(push_namespace): Likewise. Call it after setting
DECL_NAMESPACE_INLINE_P.
(cp_emit_debug_info_for_using): Pass false as new argument to
the imported_module_or_decl debug hook.
fortran/
* trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to
the imported_module_or_decl debug hook.
ada/
* gcc-interface/utils.c (gnat_write_global_declarations): Pass false
as new argument to the imported_module_or_decl debug hook.
testsuite/
* g++.dg/debug/dwarf2/inline-ns-1.C: New test.
* g++.dg/debug/dwarf2/inline-ns-2.C: New test.
From-SVN: r250713
|
|
* final.c (last_columnnum, override_columnnum): New variables.
(final_start_function): Set last_columnnum, pass it to begin_prologue
hook and pass 0 to dwarf2out_begin_prologue.
(final_scan_insn): Update override_columnnum. Pass last_columnnum
to source_line debug hook.
(notice_source_line): Compute last_columnnum and for debug_column_info
return true on column changes.
* debug.h (struct gcc_debug_hooks): Add column argument to
source_line and begin_prologue hooks.
(debug_nothing_int_charstar_int_bool): Remove prototype.
(debug_nothing_int_int_charstar,
debug_nothing_int_int_charstar_int_bool): New prototypes.
(dwarf2out_begin_prologue): Add column argument.
* debug.c (do_nothing_debug_hooks): Adjust source_line and
begin_prologue hooks.
(debug_nothing_int_charstar_int_bool): Remove.
(debug_nothing_int_int_charstar,
debug_nothing_int_int_charstar_int_bool): New functions.
* dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
through to dwarf2out_source_line.
(dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
(dwarf2out_source_line): Add column argument, emit it if requested.
* sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
arguments.
* xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
* xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
* vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
through to dwarf2out_begin_prologue.
(vmsdbgout_source_line): Add column argument, pass it through to
dwarf2out_source_line.
* dbxout.c (dbxout_begin_prologue): Add column argument, adjust
dbxout_source_line caller.
(dbxout_source_line): Add column argument.
From-SVN: r245564
|
|
From-SVN: r243994
|
|
2016-09-20 Richard Biener <rguenther@suse.de>
* debug.h (gcc_debug_hooks): Add filename parameter to early_finish
hook.
* debug.c (do_nothing_debug_hooks): Adjust.
* dbxout.c (dbx_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
(dwarf2out_finish): Move producer, filename and
path annotation ...
(dwarf2out_early_finish): ... here. Remove in_lto_p special-casing.
* cgraphunit.c (symbol_table::finalize_compilation_unit): Adjust.
lto/
* lto.c (lto_main): Call early_finish with "<artificial>" as
filename.
From-SVN: r240255
|
|
From-SVN: r232055
|
|
Enhance the DWARF back-end to emit proper descriptions for
variable-length records as well as variant parts in records.
In order to achieve this, generate DWARF expressions ("location
descriptions" in dwarf2out's parlance) for size and data member location
attributes. Also match QUAL_UNION_TYPE data types as variant parts,
assuming the formers appear only to implement the latters (which is the
case at the moment: only the Ada front-end emits them).
Note that very few debuggers can handle these descriptions (GDB does not
yet), so in order to ease the the transition enable these only when
-fgnat-encodings=minimal.
gcc/ada/ChangeLog:
* gcc-interface/decl.c (gnat_to_gnu_entity): Disable ___XVS GNAT
encodings when -fgnat-encodings=minimal.
(components_to_record): Disable ___XVE, ___XVN, ___XVU and
___XVZ GNAT encodings when -fgnat-encodings=minimal.
* gcc-interface/utils.c (maybe_pad_type): Disable __XVS GNAT
encodings when -fgnat-encodings=minimal.
gcc/ChangeLog:
* debug.h (struct gcc_debug_hooks): Add a new size_function
hook.
* debug.c (do_nothing_debug_hooks): Set the size_function field
to no-op.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* stor-layout.c (finalize_size_functions): Let the debug info
back-end know about the implementation of size functions.
* dwarf2out.h (dw_discr_list_ref): New typedef.
(enum dw_val_class): Add value classes for discriminant values
and discriminant lists.
(struct dw_discr_value): New structure.
(struct dw_val_node): Add discriminant values and discriminant
lists to the union.
(struct dw_loc_descr_node): Add frame_offset_rel and
dw_loc_frame_offset (only for checking) fields to handle DWARF
procedures generation.
(struct dw_discr_list_node): New structure.
* dwarf2out.c (dwarf2out_size_function): New.
(dwarf2_debug_hooks): Set the size_function field to
dwarf2out_size_function.
(dwarf2_lineno_debug_hooks): Set the size_function field to
no-op.
(new_loc_descr): Initialize the
dw_loc_frame_offset field.
(dwarf_proc_stack_usage_map): New.
(dw_val_equal_p): Handle discriminants.
(size_of_discr_value): New.
(size_of_discr_list): New.
(size_of_die): Handle discriminants.
(add_loc_descr_to_each): New.
(add_loc_list): New.
(print_discr_value): New.
(print_dw_val): Handle discriminants.
(value_format): Handle discriminants.
(output_discr_value): New.
(output_die): Handle discriminants.
(output_loc_operands): Handle DW_OP_call2 and DW_OP_call4.
(uint_loc_descriptor): New.
(uint_comparison_loc_list): New.
(loc_list_from_uint_comparison): New.
(add_discr_value): New.
(add_discr_list): New.
(AT_discr_list): New.
(loc_descr_to_next_no_op): New.
(free_loc_descr): New.
(loc_descr_without_nops): New.
(struct loc_descr_context): Add a dpi field.
(struct dwarf_procedure_info): New helper structure.
(new_dwarf_proc_die): New.
(is_handled_procedure_type): New.
(resolve_args_picking_1): New.
(resolve_args_picking): New.
(function_to_dwarf_procedure): New.
(copy_dwarf_procedure): New.
(copy_dwarf_procs_ref_in_attrs): New.
(copy_dwarf_procs_ref_in_dies): New.
(break_out_comdat_types): Copy DWARF procedures along with the
types that reference them.
(loc_list_from_tree): Rename into loc_list_from_tree_1. Handle
CALL_EXPR in the cases suitable for DWARF procedures. Handle
for PARM_DECL when generating a location description for a DWARF
procedure. Handle big unsigned INTEGER_CST nodes. Handle
NON_LVALUE_EXPR, EXACT_DIV_EXPR and all unsigned comparison
operators. Add a wrapper for loc_list_from_tree that strips
DW_OP_nop operations from the result.
(type_byte_size): New.
(struct vlr_context): New helper structure.
(field_byte_offset): Change signature to return either a
constant offset or a location description for dynamic ones.
Handle dynamic byte offsets with constant bit offsets and handle
fields in variant parts.
(add_data_member_location): Change signature to handle dynamic
member offsets and fields in variant parts. Update call to
field_byte_offset. Handle location lists. Emit a variable data
member location only when -fgnat-encodings=minimal.
(add_bound_info): Emit self-referential bounds only when
-fgnat-encodings=minimal.
(add_byte_size_attribute): Use type_byte_size in order to handle
dynamic type sizes. Emit variable byte size only when
-fgnat-encodings=minimal and when the target DWARF version
allows them.
(add_bit_offset_attribute): Change signature to handle
variable-length records. Update call to field_byte_offset.
(gen_descr_array_type_die): Update call to gen_field_die.
Update loc_descr_context literal.
(gen_type_die_for_member): Likewise.
(gen_subprogram_die): Update calls to get_decl_die.
(gen_field_die): Change signature to handle variable-length
records. Update calls to add_bit_offset_attribute and
add_data_member_location_attribute.
(gen_inheritance_die): Update call to
add_data_member_location_attribute.
(gen_decl_die): Change signature to handle variable-length
records. Update call to gen_field_die.
(gen_inheritance_die): Change signature to handle
variable-length records. Update call to
add_data_member_location_attribute.
(is_variant_part): New.
(analyze_discr_in_predicate): New.
(get_discr_value): New.
(analyze_variants_discr): New.
(gen_variant_part): New.
(gen_member_die): Update calls to gen_decl_die. Call instead
gen_variant_part for variant parts.
(gen_type_die_with_usage): Update calls to gen_decl_die.
(process_scope_var): Likewise.
(force_decl_die): Likewise.
(declare_in_namespace): Likewise.
(dwarf2out_decl): Likewise.
(prune_unused_types_walk_loc_descr): New.
(prune_unused_types_walk_attribs): Mark DIEs referenced by
location descriptions and loc. descr. lists.
(prune_unused_types_walk): Don't mark DWARF procedures by
default. Mark variant parts since nothing is supposed to
reference them.
(dwarf2out_init): Allocate dwarf_proc_stack_usage_map.
(dwarf2out_c_finalize): Deallocate and reset
dwarf_proc_stack_usage_map.
gcc/testsuite/ChangeLog:
* gnat.dg/specs/debug1.ads: Update the expected number of
DW_AT_artificial attribute in compiler output.
From-SVN: r231762
|
|
gcc/
* config/nvptx/nvptx.c (nvptx_option_override): Don't override
debug options.
* config/nvptx/nvptx.h (DWARF2_LINENO_DEBUGGING_INFO): Define.
(DWARF2_DEBUGGING_INFO): Don't define.
* debug.h (dwarf2_lineno_debug_hooks): Declare.
* toplev.c (process_options): Add a case for it.
* dwarf2out.c (dwarf2_lineno_debug_hooks): New variable.
(dwarf2out_init): Skip most initializations if
DWARF2_LINENO_DEBUGGING_INFO, but set cur_line_info_table in that
case.
* defaults.h (PREFERRED_DEBUGGING_TYPE): Also use DWARF2_DEBUG if
DWARF2_LINENO_DEBUGGING_INFO.
* opts.c (set_debug_level): Likewise.
Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
From-SVN: r226890
|
|
PR debug/66503
gcc/ChangeLog:
* debug.h (struct gcc_debug_hooks): Add a
register_main_translation_unit hook.
* debug.c (do_nothing_debug_hooks): Provide a function for this
new hook.
* dbxout.c (dbx_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dwarf2out.c (main_translation_unit): New global variable.
(dwarf2out_register_main_translation_unit): New function
implementing the new hook.
(dwarf2_debug_hooks): Assign
dwarf2out_register_main_translation_unit to this new hook.
(dwarf2out_init): Associate any main translation unit to
comp_unit_die ().
* c/c-decl.c (pop_scope): Register the main translation unit
through the new debug hook.
* cp/decl.c (cxx_init_decl_processing): Likewise.
gcc/ada/ChangeLog:
* gcc-interface/utils.c (get_global_context): Register the main
translation unit through the new debug hook.
gcc/fortran/ChangeLog:
* f95-lang.c (gfc_create_decls): Register the main translation
unit through the new debug hook.
From-SVN: r224371
|
|
* dwarf2out.c: Remove deferred_locations*.
(dwarf2_debug_hooks): Add early_finish hook.
Remove global_decl hook.
Add early_global_decl and late_global_decl hook.
New global early_dwarf.
New structure set_early_dwarf.
(output_die): Indicate whether a DIE was generated early
when generating assembly with -dA.
(struct limbo_die_struct): Document created_for field.
Remove file_table_last_lookup.
(remove_AT): Return TRUE if successful.
(remove_child_TAG): Clear die_parent.
(reparent_child): New function abstracted from...
(splice_child_die): ...here.
(new_die): ICE if a DIE ends up in limbo too late.
(check_die): New.
(defer_location): Remove.
(add_subscript_info): Reuse DW_TAG_subrange_type if available.
(fill_variable_array_bounds): New.
(decl_start_label): Call fill_variable_array_bounds.
(gen_formal_parameter_die): Rewrite to reuse previously generated
DIEs.
(gen_subprogram_die): Same.
(gen_variable_die): Same.
(gen_const_die): Same.
(gen_label_die): Same.
(gen_lexical_block_die): Same.
(decl_will_get_specification_p): New.
(local_function_static): New.
(gen_struct_or_union_type_die): Fill in variable-length fields.
(gen_typedef_die): Fill in variable-length typedefs.
(gen_tagged_type_die): Gracefully return on error_mark_node.
Handle re-entrancy.
(gen_type_die_with_usage): Handle variable-length types.
Remove duplicate code for ARRAY_TYPE case.
(process_scope_var): Only process imported modules during early
dwarf.
(dwarf2out_early_global_decl): New.
(dwarf2out_late_global_decl): Rename from dwarf2out_global_decl.
(dwarf2out_type_decl): Set early_dwarf while calling
dwarf2out_decl.
(dwarf2out_decl): Verify that we did not recreate a previously
generated DIE.
Do not return on DECL_EXTERNALs in VAR_DECLs.
Abstract some code to local_function_static.
(lookup_filename): Remove use of file_table_last_lookup.
Gracefully exit on missing file_name.
(dwarf2out_finish): Verify limbo list.
Remove deferred_locations_list use.
Move deferred_asm_name and limbo flushing to...
(dwarf2out_early_finish): ...here. New.
(dwarf2out_c_finalize): Remove set of deferred_location_list,
deferred_asm_name, and file_table_last_lookup.
* cgraph.h (referred_to_p): Add default argument.
* cgraphunit.c (referred_to_p): Add and handle include_self
argument.
(analyze_functions): Add first_time argument.
Call check_global_declaration for all symbols.
Call late_global_decl for nodes for moribund nodes.
(finalize_compilation_unit): Add new argument to
analyze_functions.
Call early_global_decl for functions.
Call early_finish debug hook.
* dbxout.c (dbxout_early_global_decl): New.
(dbxout_late_global_decl): New. Adapted from dbxout_global_decl.
(dbx_debug_hooks): Add new hooks.
(xcoff_debug_hooks): Same.
* debug.c (do_nothing_debug_hooks): Add early_finish field.
Add early and late debug hooks.
Remove global_decl hook.
* debug.h (struct gcc_debug_hooks): Add early_finish,
early_global_decl, and late_global_decl fields.
Remove global_decl field.
Document gcc_debug_hooks.
* gengtype.c (output_typename): Remove.
* godump.c (go_early_global_decl): New.
(go_late_global_decl): New.
(go_global_decl): Remove.
(dump_go_spec_init): Remove global_decl. Add
{early,late}_global_decl.
* langhooks-def.h (LANG_HOOKS_WRITE_GLOBALS): Remove.
(LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
* langhooks.c (lhd_warn_unused_global_decl): Adjust comment.
(write_global_declarations): Remove.
(global_decl_processing): New.
* langhooks.h (struct lang_hooks_for_decls): Remove
final_write_globals field.
Add post_compilation_parsing_cleanups field.
* passes.c (rest_of_decl_compilation): Call early_global_decl.
* sdbout.c: Add early and late_global_decl hooks. Remove
sdbout_global_decl hook.
Add early_finish field for sdb_debug_hooks.
(sdbout_global_decl): Remove.
(sdbout_early_global_decl): New.
(sdbout_late_global_decl): New.
* timevar.def (TV_PHASE_LATE_PARSING_CLEANUPS): New.
* toplev.c (check_global_declaration): Rename from
check_global_declaration_1.
Adapt to use symtab infrastructure.
(check_global_declarations): Remove.
(emit_debug_global_declarations): Remove.
(compile_file): Remove call to final_write_globals langhook.
Run the actual compilation process.
Perform any post compilation parser cleanups.
Generate late debug info.
* toplev.h (check_global_declaration): New.
(check_global_declaration_1): Remove.
(check_global_declarations): Remove.
(write_global_declarations): Remove.
(emit_debug_global_declarations): Remove.
(global_decl_processing): New.
* tree-core.h (struct tree_block): Add DIE field.
* tree.h (BLOCK_DIE): New.
* vmsdbgout.c (vmsdbgout_global_decl): Remove function and its use
throughout.
(vmsdbgout_early_global_decl): New.
(vmsdbgout_late_global_decl): New.
Add early_finish debug hook field to vmsdbg_debug_hooks.
Remove vmsdbgout_decl to vmsdbgout_function_decl.
Add early and late_global_decl debug hooks.
From-SVN: r224161
|
|
From-SVN: r219188
|
|
From-SVN: r214914
|
|
early=true.
+ * c/c-decl.c (write_global_declarations_1): Call global_decl()
+ with early=true.
+ (write_global_declarations_2): Call global_decl() with
+ early=false.
+ * dbxout.c (dbxout_global_decl): New argument.
+ * debug.c (do_nothing_debug_hooks): Use debug_nothing_tree_bool
+ for global_decl hook.
+ (debug_nothing_tree_bool): New.
+ (struct gcc_debug_hooks): New argument to global_decl.
+ * dwarf2out.c (output_die): Add misc debugging information.
+ (gen_variable_die): Do not reparent children.
+ (dwarf2out_global_decl): Add new documentation. Add EARLY
+ argument.
+ (dwarf2out_decl): Make sure we don't generate new DIEs if we
+ already have a DIE.
+ * cp/name-lookup.c (do_namespace_alias): New argument to
+ global_decl debug hook.
+ * fortran/trans-decl.c (gfc_emit_parameter_debug_info): Same.
+ * godump.c (go_global_decl): Same.
+ * lto/lto-lang.c (lto_write_globals): Same.
+ * sdbout.c (sdbout_global_decl): Same.
+ * toplev.c (emit_debug_global_declarations): Same.
+ * vmsdbgout.c (vmsdbgout_global_decl): Same.
+ * tree.c (free_lang_data_in_decl): Do not call
+ dwarf2out_early_decl from here.
From-SVN: r214911
|
|
This is the original patch from Michael Matz, ported to a more recent
mainline.
From-SVN: r214906
|
|
2014-08-21 David Malcolm <dmalcolm@redhat.com>
* debug.h (struct gcc_debug_hooks): Strengthen param 1 of hook
"label" from rtx to rtx_code_label *. Strengthen param 1 of
"var_location" hook from rtx to rtx_insn *.
(debug_nothing_rtx): Delete in favor of...
(debug_nothing_rtx_code_label): New prototype.
(debug_nothing_rtx_rtx): Delete unused prototype.
(debug_nothing_rtx_insn): New prototype.
* final.c (final_scan_insn): Add checked cast to rtx_insn * when
invoking debug_hooks->var_location (in two places, one in a NOTE
case of a switch statement, the other guarded by a CALL_P
conditional. Add checked cast to rtx_code_label * when invoking
debug_hooks->label (within CODE_LABEL case of switch statement).
* dbxout.c (dbx_debug_hooks): Update "label" hook from
debug_nothing_rtx to debug_nothing_rtx_code_label. Update
"var_location" from debug_nothing_rtx to debug_nothing_rtx_insn.
(xcoff_debug_hooks): Likewise.
* debug.c (do_nothing_debug_hooks): Likewise.
(debug_nothing_rtx): Delete in favor of...
(debug_nothing_rtx_insn): New function.
(debug_nothing_rtx_rtx): Delete unused function.
(debug_nothing_rtx_code_label): New function.
* dwarf2out.c (dwarf2_debug_hooks): Update "label" hook from
debug_nothing_rtx to debug_nothing_rtx_code_label.
(dwarf2out_var_location): Strengthen param "loc_note" from rtx
to rtx_insn *.
* sdbout.c (sdb_debug_hooks): Update "var_location" hook from
debug_nothing_rtx to debug_nothing_rtx_insn.
(sdbout_label): Strengthen param "insn" from rtx to
rtx_code_label *.
* vmsdbgout.c (vmsdbg_debug_hooks): Update "label" hook from
debug_nothing_rtx to debug_nothing_rtx_code_label. Update
"var_location" hook from debug_nothing_rtx to
debug_nothing_rtx_insn.
From-SVN: r214259
|
|
From-SVN: r206289
|
|
From-SVN: r195098
|
|
* tree-pass.h (pass_dwarf2_frame): Declare.
* passes.c (init_optimization_passes): Add it.
* dwarf2cfi.c (dwarf2out_frame_debug): Make static.
(create_cfi_notes): Rename from dwarf2out_frame_debug_after_prologue;
make static, do not call add_cfis_to_fde.
(dwarf2out_frame_debug_init, dwarf2cfi_function_init,
dwarf2out_frame_init): Merge into...
(execute_dwarf2_frame): ... here. New function.
(dwarf2out_do_frame, dwarf2out_do_cfi_asm): Make boolean. Change
saved_do_cfi_asm to a tri-state variable.
(gate_dwarf2_frame, pass_dwarf2_frame): New.
* dwarf2out.c (dwarf2out_begin_prologue): Only allocate the fde
if it has yet to be done. Don't call dwarf2cfi_function_init.
* dwarf2out.h, debug.h: Update decls.
* final.c (final_start_function): Don't call
dwarf2out_frame_debug_init or dwarf2out_frame_debug_after_prologue.
* lto-streamer-in.c (lto_init_eh): Don't call dwarf2out_frame_init.
* toplev.c (lang_dependent_init): Likewise.
From-SVN: r176019
|
|
* debug.h (debug_flush_symbol_queue, debug_queue_symbol): Delete.
(debug_free_queue, debug_nesting, symbol_queue_index): Delete.
* final.c (debug_flush_symbol_queue, debug_queue_symbol):
Move these...
(debug_free_queue, debug_nesting, symbol_queue_index):
...and these...
* dbxout.c: ...to here. Make static.
From-SVN: r171981
|
|
* emit-rtl.c (try_split): Don't call copy_call_info debug hook.
* calls.c: Remove debug.h include.
(emit_call_1): Don't call virtual_call_token debug hook.
* dwarf2out.c (debug_dcall_section, debug_vcall_section,
dcall_entry, vcall_entry, dcall_table, vcall_table, vcall_insn,
vcall_insn_table, DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION,
size_of_dcall_table, output_dcall_table, size_of_vcall_table,
output_vcall_table, dwarf2out_direct_call, vcall_insn_table_hash,
vcall_insn_table_eq, store_vcall_insn, lookup_vcall_insn,
dwarf2out_virtual_call_token, dwarf2out_copy_call_info,
dwarf2out_virtual_call): Remove.
(dwarf2_debug_hooks): Remove direct_call, virtual_call_token,
copy_call_info and virtual_call hooks.
(dwarf2out_init): Don't initialize vcall_insn_table,
debug_dcall_section and debug_vcall_section.
(prune_unused_types): Don't mark nodes from dcall_table.
(dwarf2out_finish): Don't output dcall or vcall tables.
* final.c (final_scan_insn): Don't call direct_call or
virtual_call debug hooks.
* debug.h (struct gcc_debug_hooks): Remove direct_call,
virtual_call_token, copy_call_info and virtual_call hooks.
(debug_nothing_uid): Remove prototype.
* sdbout.c (sdb_debug_hooks): Remove direct_call, virtual_call_token,
copy_call_info and virtual_call hooks.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
* debug.c (do_nothing_debug_hooks): Likewise.
(debug_nothing_uid): Remove.
* doc/invoke.texi (-fenable-icf-debug): Remove.
* common.opt (-fenable-icf-debug): Likewise.
* g++.dg/debug/dwarf2/icf.C: Adjust for -fenable-icf-debug removal.
From-SVN: r171037
|
|
gcc/:
* godump.c: New file.
* common.opt (fdump-go-spec=): New option.
* tree.h: Add comments for TYPE_SYMTAB_ADDRESS and friends.
(TYPE_SYMTAB_IS_ADDRESS, TYPE_SYMTAB_IS_POINTER): Define.
(TYPE_SYMTAB_IS_DIE): Define.
(struct tree_type): Change GTY for symtab field to use
TYPE_SYMTAB_IS_ADDRESS and friends and to use a debug_hooks field
to pick the union field.
* debug.h (struct gcc_debug_hooks): Add tree_type_symtab_field.
(dump_go_spec_init): Declare.
* toplev.c (process_options): Handle flag_dump_go_spec.
* debug.c: Include "tree.h".
(do_nothing_debug_hooks): Set tree_type_symtab_field.
* dwarf2out.c (dwarf2_debug_hooks): Likewise.
* dbxout.c (dbx_debug_hooks): Likewise.
(xcoff_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise. Do not define if
SDB_DEBUGGING_INFO is not defined.
* doc/invoke.texi (Option Summary): Mention -fdump-go-spec.
(Overall Options): Document -fdump-go-spec.
* Makefile.in (OBJS-common): Add godump.o.
(debug.o): Add dependency on $(TREE_H).
(godump.o): New target.
(GTFILES): Add $(srcdir)/godump.c.
gcc/c-family/:
* c-lex.c (init_c_lex): Set macro debug callbacks if
flag_dump_go_spec is set.
From-SVN: r166770
|
|
that are needed by the VMS debugger on I64.
* config/ia64/vms.h (ASM_OUTPUT_DWARF_DELTA_UNITS): Remove.
(ASM_OUTPUT_DWARF_VMS_DELTA: Define new macro.
* dbxout.c (gcc_debug_hooks): New entry begin_epilogue.
* debug.c: Likewise.
* sdbout.c: Likewise.
* vmsdbgout.c: Likewise.
* debug.h: Likewise. (dwarf2out_vms_{begin,end}_prologue): Declare.
* doc/tm.texi (ASM_OUTPUT_DWARF_VMS_DELTA): Document.
* dwarf2asm.c (dw2_asm_output_vms_delta): New function.
(ASM_OUTPUT_DWARF_VMS_DELTA): Call it.
* dwarf2asm.h (dw2_asm_output_vms_delta): Declare.
* dwarf2out.c (dw_fde_struct): New fields
dw_fde_vms_{end,begin}_prologue.
(PROLOGUE_END_LABEL, EPILOGUE_BEGIN_LABEL): New macros.
(dwarf2out_begin_prologue): Set dw_fde_struct defaults for above.
(dwarf2out_vms_end_prologue): New function.
(dwarf2out_vms_begin_epilogue): New function.
(dw_val_struct): New value dw_val_class_vms_delta.
(gcc_debug_hooks): New entry begin_epilogue. Set end_prologue,
begin_epilogue for VMS.
(AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): Declare
new static functions.
(dwarf_attr_name): New cases DW_AT_HP_{prologue,epilogue}.
(AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): New
static functions.
(print_die): New case dw_val_class_vms_delta.
(attr_checksum): Likewise.
(same_dw_val_p: Likewise.
(size_of_die): Likewise.
(value_format): Likewise.
(output_die): Likewise.
(gen_subprogram_die): Call add_AT_vms_delta on VMS.
(dwarf2out_begin_epilogue): Rename to dwarf2out_cfi_begin_epilogue
* dwarf2out.h (dwarf2out_begin_epilogue): Rename to
dwarf2out_cfi_begin_epilogue
* final.c (final_scan_insn): Likewise. Call begin_epilogue.
From-SVN: r160858
|
|
gcc/ChangeLog:
PR debug/41700
* dwarf2out.c (dwarf2_debug_hooks): Add entries for new hook (two
locations in the source).
(store_vcall_insn): New function.
(lookup_vcall_insn): New function.
(dwarf2out_virtual_call_token): Use store_vcall_insn.
(dwarf2out_copy_call_info): New function.
(dwarf2out_virtual_call): Use lookup_vcall_insn.
* emit-rtl.c (try_split): Call copy_call_info debug hook.
* debug.h (struct gcc_debug_hooks): Add copy_call_info hook.
* debug.c (do_nothing_debug_hooks): Add dummy entry for new hook.
(debug_nothing_rtx_rtx): New dummy hook.
* dbxout.c (dbx_debug_hooks): Add dummy entry for new hook.
(xcoff_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
From-SVN: r153719
|
|
PR debug/40521
* debug.h (struct gcc_debug_hooks): Add assembly_start hook.
* cgraphunit.c (cgraph_optimize): Call it.
* dwarf2out.c (dwarf2out_init): Move .cfi_sections printing into...
(dwarf2out_assembly_start): ... here. New hook.
(dwarf2out_debug_hooks): Add dwarf2out_assembly_start.
* debug.c (do_nothing_debug_hooks): Do nothing for assembly_start
hook.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Add vmsdbgout_assembly_start.
(vmsdbgout_assembly_start): New hook.
From-SVN: r152930
|
|
gcc/ChangeLog:
Add support for debugging with ICF (Identical Code Folding).
* calls.c (debug.h): New #include.
(emit_call_1): Call virtual_call_token debug hook.
* common.opt (-fenable-icf-debug): New option.
* dwarf2out.c (dwarf2_debug_hooks): Add entries for new hooks (two
locations in the source).
(poc_label_num): New variable.
(dcall_entry, vcall_entry): New typedefs.
(dcall_table, vcall_table): New variables.
(struct vcall_insn): New type.
(vcall_insn_table): New variable.
(DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION): New macros.
(size_of_dcall_table): New function.
(output_dcall_table): New function.
(size_of_vcall_table): New function.
(output_vcall_table): New function.
(dwarf2out_direct_call): New function.
(vcall_insn_table_hash): New function.
(vcall_insn_table_eq): New function.
(dwarf2out_virtual_call_token): New function.
(dwarf2out_virtual_call): New function.
(dwarf2out_init): Allocate new tables and sections.
(prune_unused_types): Mark DIEs referenced from direct call table.
(dwarf2out_finish): Output direct and virtual call tables.
* final.c (final_scan_insn): Call direct_call and virtual_call
debug hooks.
* debug.h (struct gcc_debug_hooks): Add direct_call,
virtual_call_token, virtual_call hooks.
(debug_nothing_uid): New function.
* debug.c (do_nothing_debug_hooks): Add dummy entries for new hooks.
(debug_nothing_uid): New function.
* dbxout.c (dbx_debug_hooks): Add dummy entries for new hooks.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* doc/invoke.texi (-fenable-icf-debug): New option.
gcc/testsuite/ChangeLog:
Add support for debugging with ICF (Identical Code Folding).
* g++.dg/debug/dwarf2/icf.C: New test.
From-SVN: r152577
|
|
* dbxout.c (dbxout_source_line): Add is_stmt parameter.
Change caller.
* debug.c (struct gcc_debug_hooks): Change placeholder for
source_line hook.
(debug_nothing_int_charstar_int): Replaced by...
(debug_nothing_int_charstar_int_bool): ...this.
* debug.h (struct gcc_debug_hooks): Add is_stmt parameter to
source_line prototype.
(debug_nothing_int_charstar_int): Replaced by...
(debug_nothing_int_charstar_int_bool): ...this.
* defaults.h (SUPPORTS_DISCRIMINATOR): New constant.
* dwarf2out.c (dwarf2out_source_line): Add is_stmt parameter.
Output is_stmt operand when necessary.
* final.c (last_is_stmt): New variable.
(final_start_function): Initialize last_is_stmt.
(final_scan_insn): Pass is_stmt to source_line debug hook.
(notice_source_line): Add is_stmt parameter.
* sdbout.c (sdbout_source_line): Add is_stmt parameter.
* vmsdbgout.c (vmsdbgout_source_line): Add is_stmt parameter.
Change callers.
* xcoffout.c (xcoffout_source_line): Add is_stmt parameter.
* xcoffout.h (xcoffout_source_line): Add is_stmt parameter.
From-SVN: r148635
|
|
* basic-block.h (struct basic_block_def): Add discriminator field.
* dbxout.c (dbxout_source_line): Add new parameter. Change all
callers.
* debug.c (do_nothing_debug_hooks): Add additional entry.
(debug_nothing_int_charstar_int): New function.
* debug.h (struct gcc_debug_hooks): Add parameter to source_line
hook.
(debug_nothing_int_charstar_int): New declaration.
* dwarf2out.c (dwarf2out_source_line): Add new parameter. Write
discriminator value in .loc directive.
* final.c (last_discriminator): New variable.
(discriminator): New variable.
(final_start_function): Initialize above variables, pass current
discriminator to debug hook.
(notice_source_line): Check for discriminator change.
* gimple-pretty-print.c (dump_bb_header): Print discriminator value.
* sdbout.c (sdbout_source_line): New parameter.
* tree-cfg.c (struct locus_discrim_map): New structure type.
(discriminator_per_locus): New hash table.
(build_gimple_cfg): Allocate and free discriminator hash table.
(make_edges): Call assign_discriminator.
(locus_map_hash): New function.
(locus_map_eq): New function.
(next_discriminator_for_locus): New function.
(same_line_p): New function.
(assign_discriminator): New function.
(make_cond_expr_edges): Call assign_discriminator.
(make_gimple_switch_edges): Likewise.
(first_non_label_stmt): New function.
* vmsdbgout.c (vmsdbgout_source_line): Add new parameter. Change
all callers.
* xcoffout.c (xcoffout_source_line): Add new parameter.
* configure.ac (gcc_cv_as_discriminator): New configury check for
gas support for discriminator.
* configure: Regenerate.
* config.in: Regenerate.
From-SVN: r148191
|
|
2009-04-28 Catherine Moore <clm@codesourcery.com>
* debug.h (set_name): Add comment.
From-SVN: r146897
|
|
2009-04-15 Catherine Moore <clm@codesourcery.com>
* debug.h (set_name): Declare.
* dwarf2out.c (dwarf2out_set_name): Declare.
(dwarf2_debug_hooks): Add set_name.
(find_AT_string): New.
(add_AT_string): Call find_AT_string.
(dwarf2out_set_name): New.
* cp/decl.c (grokdeclarator): Call set_name.
* vmsdbgout.c (vmsdbg_debug_hooks): Add set_name_debug_nothing.
* debug.c (do_nothing_debug_hooks): Likewise.
* dbxout.c (dbx_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
From-SVN: r146137
|
|
From-SVN: r144324
|
|
PR fortran/29635
PR fortran/23057
* debug.h (struct gcc_debug_hooks): Add NAME and CHILD
arguments to imported_module_or_decl.
(debug_nothing_tree_tree): Removed.
(debug_nothing_tree_tree_tree_bool): New prototype.
* debug.c (do_nothing_debug_hooks): Adjust.
(debug_nothing_tree_tree): Removed.
(debug_nothing_tree_tree_tree_bool): New function.
* dwarf2out.c (is_symbol_die): Handle DW_TAG_module.
(gen_variable_die): Put all common vars for the
same COMMON block under one DW_TAG_common_block.
(declare_in_namespace): Return new context_die, for Fortran
return the module DIE instead of adding extra declarations into
the namespace.
(gen_type_die_with_usage): Adjust declare_in_namespace caller.
(gen_namespace_die): If is_fortran (), generate DW_TAG_module
instead of DW_TAG_namespace. If DECL_EXTERNAL is set, add
DW_AT_declaration.
(dwarf2out_global_decl): Don't skip Fortran global vars.
(gen_decl_die): Likewise. Adjust declare_in_namespace callers.
(dwarf2out_imported_module_or_decl): Add NAME and CHILD arguments.
If NAME is non-NULL, add DW_AT_name. If CHILD is non-NULL, put
DW_TAG_imported_declaration as child of previous
DW_TAG_imported_module.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Adjust.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
Adjust debug_hooks->imported_module_or_decl callers.
* f95-lang.c (gfc_init_ts): New function.
(LANG_HOOKS_INIT_TS): Define.
* gfortran.h (gfc_use_rename): New type, moved from module.c.
(gfc_get_use_rename): New macro, moved from module.c.
(gfc_use_list): New type.
(gfc_get_use_list): New macro.
(gfc_namespace): Add use_stmts field.
(gfc_free_use_stmts): New prototype.
* Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
* module.c (gfc_use_rename, gfc_get_use_rename): Moved to
gfortran.h.
(gfc_use_module): Chain the USE statement info to
ns->use_stmts.
(gfc_free_use_stmts): New function.
* symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
* trans.h (struct module_htab_entry): New type.
(gfc_find_module, gfc_module_add_decl): New functions.
* trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
the module, adjust DECL_CONTEXTs of module procedures and
call gfc_module_add_decl for them.
* trans-common.c (build_common_decl): Set DECL_IGNORED_P
on the common variable.
(create_common): Set DECL_IGNORED_P for use associated vars.
* trans-decl.c: Include debug.h.
(gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
modules.
(build_function_decl): Allow current_function_decl's context
to be a NAMESPACE_DECL.
(module_htab, cur_module): New variables.
(module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
functions.
(gfc_create_module_variable): Adjust DECL_CONTEXTs of module
variables and types and call gfc_module_add_decl for them.
(gfc_generate_module_vars): Temporarily set cur_module.
(gfc_trans_use_stmts): New function.
(gfc_generate_function_code): Call it.
(gfc_generate_block_data): Set DECL_IGNORED_P on decl.
* trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
and TYPE_CONTEXT of module derived types.
From-SVN: r139773
|
|
* configure.ac (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): New.
* configure, config.in: Rebuild.
* debug.h (dwarf2out_do_cfi_asm): Declare.
* c-cppbuiltin.c (c_cpp_builtins): Use it.
* dwarf2out.c (dwarf2out_do_cfi_asm): New.
(dwarf2out_cfi_label, add_fde_cfi, output_call_frame_info,
dwarf2out_begin_prologue, dwarf2out_end_epilogue): Use it.
From-SVN: r138846
|
|
-fprofile-use -D_PROFILE_USE)
PR debug/34249
* debug.h (dwarf2out_switch_text_section): Move declaration from ...
* dwarf2out.c (dwarf2out_switch_text_section): ... here. Make
function global.
* final.c (final_scan_insn) [NOTE_INSN_SWITCH_TEXT_SECTIONS]:
Depending on dwarf2out_do_frame, call dwarf2out_switch_text_section
for DWARF2_UNWIND_INFO targets.
From-SVN: r131570
|
|
* alias.c (memory_modified_1, memory_modified_in_insn_p):
Constify.
* basic-block.h (tree_predicted_by_p, rtl_predicted_by_p):
Likewise.
* bb-reorder.c (copy_bb_p): Likewise.
* cfghooks.c (can_remove_branch_p, can_merge_blocks_p,
predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
block_ends_with_condjump_p): Likewise.
* cfghooks.h (can_remove_branch_p, can_merge_blocks_p,
predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
block_ends_with_condjump_p): Likewise.
* cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise.
* cfgrtl.c (can_delete_note_p, can_delete_label_p,
rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p,
rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p,
need_fake_edge_p, rtl_can_remove_branch_p): Likewise.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use
debug_true_const_tree instad of debug_true_tree.
* debug.c (do_nothing_debug_hooks): Likewise.
* debug.h (ignore_block, debug_true_const_tree): Constify.
* dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save,
dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type,
decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc,
same_dw_val_p, add_ranges, is_subrange_type, type_is_enum,
dbx_reg_number, is_based_loc, field_type,
simple_type_align_in_bits, simple_decl_align_in_bits,
simple_type_size_in_bits, field_byte_offset, insert_float,
type_tag, member_declared_type, is_redundant_typedef,
secname_for_decl, is_inlined_entry_point): Likewise.
* emit-rtl.c (const_next_insn, const_previous_insn,
const_next_nonnote_insn, const_prev_nonnote_insn,
const_next_real_insn, const_prev_real_insn,
const_next_active_insn, const_prev_active_insn, const_next_label,
const_prev_label): Likewise.
* except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region):
Likewise.
* haifa-sched.c (may_trap_exp, haifa_classify_insn,
find_set_reg_weight, no_real_insns_p, find_set_reg_weight,
sched_insn_is_legitimate_for_speculation_p): Likewise.
* jump.c (reversed_comparison_code_parts,
reversed_comparison_code, reversed_comparison, condjump_label):
Likewise.
* predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise.
* reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned):
Likewise.
* rtl.h (const_previous_insn, const_next_insn,
const_prev_nonnote_insn, const_next_nonnote_insn,
const_prev_real_insn, const_next_real_insn,
const_prev_active_insn, const_next_active_insn, const_prev_label,
const_next_label, modified_between_p, modified_in_p,
const_note_storeskeep_with_call_p, condjump_label,
reversed_comparison, reversed_comparison_code,
reversed_comparison_code_parts, memory_modified_in_insn_p,
stack_regs_mentioned): Likewise.
* rtlanal.c (modified_between_p, modified_in_p, const_note_stores,
keep_with_call_p): Likewise.
* sched-deps.c (deps_may_trap_p, sched_get_condition,
conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list,
sd_lists_size, sd_lists_empty_p): Likewise.
* sched-int.h (sched_insns_conditions_mutex_p,
haifa_classify_insn, no_real_insns_p,
sched_insn_is_legitimate_for_speculation_p, sd_next_list,
sd_lists_size, sd_lists_empty_p): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt,
stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p,
-tree_block_ends_with_call_p, tree_block_ends_with_condjump_p):
Likewise.
* tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region,
tree_can_throw_internal): Likewise.
* tree-flow-inline.h (phi_nodes): Likewise.
* tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt,
tree_can_throw_internal, lookup_stmt_eh_region): Likewise.
* tree-gimple.c (const_get_call_expr_in): Likewise.
* tree-gimple.h (const_get_call_expr_in): Likewise.
* tree.c (const_lookup_attribute, attribute_list_equal,
attribute_list_contained): Likewise.
* tree.h (attribute_list_equal, attribute_list_contained,
const_lookup_attribute): Likewise.
* vmsdbgout.c (vmsdbgout_ignore_block): Likewise.
From-SVN: r127824
|
|
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New.
(CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Include it.
* Makefile.in: Regenerate.
* configure.ac (--with-debug-prefix-map): New.
* configure: Regenerate.
config:
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* mt-gnu (CXXFLAGS_FOR_TARGET): Add
$(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
gcc:
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* common.opt (-fdebug-prefix-map=): New option.
* opts.c: Include debug.h.
(common_handle_option): Handle -fdebug-prefix-map.
* final.c: Include ggc.h.
(struct debug_prefix_map, debug_prefix_maps, add_debug_prefix_map,
remap_debug_filename): New.
* Makefile.in (final.o, opts.o): Update dependencies.
* debug.h (remap_debug_filename, add_debug_prefix_map): Declare.
* configure.ac: Check for assembler --debug-prefix-map support.
* configure, config.in: Regenerate.
* gcc.c (ASM_MAP): Define conditional on HAVE_AS_DEBUG_PREFIX_MAP.
(ASM_DEBUG_SPEC): Include ASM_MAP.
* doc/install.texi (--with-debug-prefix-map): Document.
* doc/invoke.texi (-fdebug-prefix-map): Document.
* dbxout.c (dbxout_init, dbxout_start_source_file,
dbxout_source_file): Call remap_debug_filename.
* dwarf2out.c (add_comp_dir_attribute, maybe_emit_file,
dwarf2out_start_source_file, dwarf2out_finish): Call
remap_debug_filename.
(file_table_relative_p): Do not check d->emitted_number.
* toplev.c (output_file_directive): Call remap_debug_filename.
* vmsdbgout.c (write_srccorr): Call remap_debug_filename.
* xcoffout.c (xcoffout_source_file): Call remap_debug_filename.
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r127613
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
From-SVN: r101317
|
|
From-SVN: r97322
|
|
* builtin-types.def, c-convert.c, c-format.c, ddg.c, debug.c,
debug.h, et-forest.c, et-forest.h, gcov.c, rtl-profile.c,
rtlhooks-def.h, rtlhooks.c, sdbout.c, tree-inline.h,
tree-profile.c, tsystem.h, value-prof.h: Update copyright.
From-SVN: r97209
|
|
hooks says the writer wants it.
2005-03-22 Daniel Berlin <dberlin@dberlin.org>
* c-opts.c (c_common_parse_file): Only start/end main source file
if debug hooks says the writer wants it.
* dbxout.c (dbx_debug_hooks): Add start_end_main_source_file
member.
(xcoff_debug_hooks): Ditto.
* debug.c (do_nothing_hooks): Ditto.
* debug.h (gcc_debug_hooks): Ditto.
* dwarf2out.c (dwarf2_debug_hooks): Ditto.
* sdbout.c (sdb_debug_hooks): Ditto.
* vmsdbgout.c (vmsdbg_debug_hooks): Ditto.
From-SVN: r96902
|
|
* debug.h (struct gcc_debug_hooks): Add type_decl field.
(debug_nothing_tree_int): Prototype.
(dwarf_debug_hooks): Delete, unused.
* debug.c (do_nothing_debug_hooks): Update.
(debug_nothing_tree_int): New function.
* langhooks.h (struct lang_hooks_for_decls):
Remove builtin_type_decls field.
* langhooks-def.h (LANG_HOOKS_BUILTIN_TYPE_DECLS): Delete.
(LANG_HOOKS_DECLS): Update.
* toplev.c (rest_of_decl_compilation, rest_of_type_compilation):
Use debug_hooks->type_decl.
* dbxout.c (preinit_symbols): New static.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_init): Don't call DBX_OUTPUT_STANDARD_TYPES or
lang_hooks.decls.builtin_type_decls. Do scan preinit_symbols
for symbols to output.
(dbxout_type_decl): New function.
(dbxout_symbol): If called before dbxout_init has run, queue
the symbol for later. Apply DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER
to TYPE_DECLs before emitting them.
* xcoffout.c (assign_type_number): Delete.
(xcoff_type_numbers): New static table.
(xcoff_assign_fundamental_type_number): New function.
* xcoffout.h: Define DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER, not
DBX_OUTPUT_STANDARD_TYPES. Remove unnecessary #ifdefs.
* sdbout.c: Include varray.h.
(deferred_global_decls): New static.
(sdb_debug_hooks): Update.
(sdbout_global_decl): If we can't emit something right now,
remember it in deferred_global_decls.
(sdbout_finish): Just scan deferred_global_decls; don't call getdecls.
(sdbout_init): Initialize deferred_global_decls.
* Makefile.in: Update dependencies of sdbout.o.
* dwarf2out.c (dwarf2out_type_decl): New function.
(dwarf2_debug_hooks): Update.
* vmsdbgout.c (vmsdbg_debug_hooks): Update.
* c-decl.c (getdecls): Just return 0.
(check_for_loop_decls): Don't use getdecls.
(record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
* c-objc-common.c (c_objc_common_finish_file): Don't use getdecls.
cp:
* cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
* cp-tree.h: Don't declare cxx_builtin_type_decls.
* decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
(record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
From-SVN: r77730
|
|
Josef Zlomek <zlomekj@suse.cz>
* Makefile.in (var-tracking.o): New.
* common.opt (fvar-tracking): New.
* flags.h (flag_var_tracking): New.
* gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added.
* opts.c (common_handle_option): Add OPT_fvar_tracking.
* print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added.
* rtl.c (note_insn_name): Likewise.
* rtl.def (VAR_LOCATION): New.
* rtl.h (NOTE_VAR_LOCATION): New.
(NOTE_VAR_LOCATION_DECL): New.
(NOTE_VAR_LOCATION_LOC): New.
(enum insn_note): NOTE_INSN_VAR_LOCATION was added.
(variable_tracking_main): New exported function.
* timevar.def (TV_VAR_TRACKING): New.
* toplev.c (enum dump_file_index): Added DFI_vartrack.
(dump_file): "vartrack" was added (-dV).
(flag_var_tracking): New.
(f_options): "var-tracking" was added.
(rest_of_handle_variable_tracking): New function.
(rest_of_compilation): Run variable tracking.
(process_options): If user has not specified flag_var_tracking set it
according to optimize, debug_info_level and debug_hooks.
* tree.h (frame_base_decl): New.
* var-tracking.c: New file.
* config/ia64/ia64.c (ia64_flag_var_tracking): New variable.
(ia64_override_options): Set flags to run variable tracking in machine
dependent reorg instead of toplev.c.
(ia64_reorg): Run variable tracking if wanted.
* doc/invoke.texi: Mention variable tracking in -dV,
add and -fvar-tracking.
* doc/passes.texi: Added variable tracking pass.
Daniel Berlin <dberlin@dberlin.org>
* debug.h (struct gcc_debug_hooks): Added var_location debug hook.
* dbxout.c (dbx_debug_hooks): Likewise.
(xcoff_debug): Likewise.
* debug.c (do_nothing_debug_hooks): Likewise.
* dwarf2out.c (dwarf2_debug_hooks): Likewise.
* dwarfout.c (dwarf_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* final.c (final_scan_insn): Call var_location debug hook for each
NOTE_INSN_VAR_LOCATION.
Co-Authored-By: Daniel Berlin <dberlin@dberlin.org>
From-SVN: r77418
|