aboutsummaryrefslogtreecommitdiff
path: root/gcc/debug.c
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2009-10-08 21:00:04 +0000
committerCary Coutant <ccoutant@gcc.gnu.org>2009-10-08 14:00:04 -0700
commit77831620cf45a82c54a85091dcdc9e0affea47a9 (patch)
treed4e268cc74aaa313626c0a3a838960f89e919d48 /gcc/debug.c
parent968e57283eda9b6f9eb513b0e8572c8a9efaa79f (diff)
downloadgcc-77831620cf45a82c54a85091dcdc9e0affea47a9.zip
gcc-77831620cf45a82c54a85091dcdc9e0affea47a9.tar.gz
gcc-77831620cf45a82c54a85091dcdc9e0affea47a9.tar.bz2
Add support for debugging with ICF (Identical Code Folding).
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
Diffstat (limited to 'gcc/debug.c')
-rw-r--r--gcc/debug.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/debug.c b/gcc/debug.c
index df69fd5..8035c43 100644
--- a/gcc/debug.c
+++ b/gcc/debug.c
@@ -50,6 +50,9 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
debug_nothing_int, /* handle_pch */
debug_nothing_rtx, /* var_location */
debug_nothing_void, /* switch_text_section */
+ debug_nothing_tree, /* direct_call */
+ debug_nothing_tree_int, /* virtual_call_token */
+ debug_nothing_uid, /* virtual_call */
debug_nothing_tree_tree, /* set_name */
0 /* start_end_main_source_file */
};
@@ -127,3 +130,8 @@ debug_nothing_tree_int (tree decl ATTRIBUTE_UNUSED,
int local ATTRIBUTE_UNUSED)
{
}
+
+void
+debug_nothing_uid (int uid ATTRIBUTE_UNUSED)
+{
+}