diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2015-08-14 12:37:14 +0200 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2015-08-14 12:37:14 +0200 |
commit | c9665100d6ee2421d8dfe4d001d23019bd4e656b (patch) | |
tree | 8189e99af744125ec05335a8f2882bd1a974d006 /gcc/dwarf2out.c | |
parent | 4436a80d12ba748d790b0c699641a065a5599a3d (diff) | |
download | gcc-c9665100d6ee2421d8dfe4d001d23019bd4e656b.zip gcc-c9665100d6ee2421d8dfe4d001d23019bd4e656b.tar.gz gcc-c9665100d6ee2421d8dfe4d001d23019bd4e656b.tar.bz2 |
Add DWARF2_LINENO_DEBUGGING_INFO, and use it for nvptx
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
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2c7dc71..92903f8 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -2489,6 +2489,43 @@ const struct gcc_debug_hooks dwarf2_debug_hooks = 1, /* start_end_main_source_file */ TYPE_SYMTAB_IS_DIE /* tree_type_symtab_field */ }; + +const struct gcc_debug_hooks dwarf2_lineno_debug_hooks = +{ + dwarf2out_init, + debug_nothing_charstar, + debug_nothing_void, + debug_nothing_void, + debug_nothing_int_charstar, + debug_nothing_int_charstar, + debug_nothing_int_charstar, + debug_nothing_int, + debug_nothing_int_int, /* begin_block */ + debug_nothing_int_int, /* end_block */ + debug_true_const_tree, /* ignore_block */ + dwarf2out_source_line, /* source_line */ + debug_nothing_int_charstar, /* begin_prologue */ + debug_nothing_int_charstar, /* end_prologue */ + debug_nothing_int_charstar, /* begin_epilogue */ + debug_nothing_int_charstar, /* end_epilogue */ + debug_nothing_tree, /* begin_function */ + debug_nothing_int, /* end_function */ + debug_nothing_tree, /* register_main_translation_unit */ + debug_nothing_tree, /* function_decl */ + debug_nothing_tree, /* early_global_decl */ + debug_nothing_tree, /* late_global_decl */ + debug_nothing_tree_int, /* type_decl */ + debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */ + debug_nothing_tree, /* deferred_inline_function */ + debug_nothing_tree, /* outlining_inline_function */ + debug_nothing_rtx_code_label, /* label */ + debug_nothing_int, /* handle_pch */ + debug_nothing_rtx_insn, /* var_location */ + debug_nothing_void, /* switch_text_section */ + debug_nothing_tree_tree, /* set_name */ + 0, /* start_end_main_source_file */ + TYPE_SYMTAB_IS_ADDRESS /* tree_type_symtab_field */ +}; /* NOTE: In the comments in this file, many references are made to "Debugging Information Entries". This term is abbreviated as `DIE' @@ -23183,6 +23220,7 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) /* Allocate the file_table. */ file_table = hash_table<dwarf_file_hasher>::create_ggc (50); +#ifndef DWARF2_LINENO_DEBUGGING_INFO /* Allocate the decl_die_table. */ decl_die_table = hash_table<decl_die_hasher>::create_ggc (10); @@ -23298,11 +23336,16 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) switch_to_section (text_section); ASM_OUTPUT_LABEL (asm_out_file, text_section_label); +#endif /* Make sure the line number table for .text always exists. */ text_section_line_info = new_line_info_table (); text_section_line_info->end_label = text_end_label; +#ifdef DWARF2_LINENO_DEBUGGING_INFO + cur_line_info_table = text_section_line_info; +#endif + /* If front-ends already registered a main translation unit but we were not ready to perform the association, do this now. */ if (main_translation_unit != NULL_TREE) |