diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-01-12 16:27:53 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-05-06 16:37:58 +0200 |
commit | e69ac0203725fb8da83a1cc88d32191b7a0b2c0c (patch) | |
tree | 26336b92515ae622b239818452a41a394fdbf2c9 /gcc/debug.h | |
parent | 0f442f1378f4e9866793309504e38467f34c5d61 (diff) | |
download | gcc-e69ac0203725fb8da83a1cc88d32191b7a0b2c0c.zip gcc-e69ac0203725fb8da83a1cc88d32191b7a0b2c0c.tar.gz gcc-e69ac0203725fb8da83a1cc88d32191b7a0b2c0c.tar.bz2 |
Add line debug info for virtual thunks
There is no debug info when the DECL_IGNORED_P flag
is set. But sometimes we have the line info of the
function decl, as in the case of on virtual thunks.
So instead of no line info at all, we emit at least
the location of the function decl.
On the other side, there are DECL_IGNORED_P functions
which do not have any source line info at all.
Remove those from the debug_range info, to make it
clear for the debugger that the line info for these
functions is invalid. This has the effect that the
debugger will not step into the function without
debug info.
2021-05-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR ipa/97937
* debug.h (gcc_debug_hooks): Add set_ignored_loc function pointer.
* dwarf2out.h (dw_fde_node::ignored_debug): New data item.
* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Add dummy
set_ignored_loc callbacks.
* debug.c (do_nothing_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dwarf2out.c (text_section_used, cold_text_section_used): Remove.
(in_text_section_p, last_text_label, last_cold_label,
switch_text_ranges, switch_cold_ranges): New data items.
(dwarf2out_note_section_used): Remove.
(dwarf2out_begin_prologue): Set fde->ignored_debug and
in_text_section_p.
(mark_ignored_debug_section): New helper function.
(dwarf2out_end_epilogue, dwarf2out_switch_text_section): Call
mark_ignored_debug_section.
(dwarf2_debug_hooks): Use dwarf2out_set_ignored_loc.
(dwarf2_lineno_debug_hooks): Use dummy for set_ignored_loc.
(size_of_aranges): Adjust formula for multi-part text ranges size.
(output_aranges): Output multi-part text ranges.
(dwarf2out_set_ignored_loc): New callback function.
(dwarf2out_finish): Output multi-part text ranges.
(dwarf2out_c_finalize): Clear new data items.
* final.c (final_start_function_1): Call set_ignored_loc callback.
(final_scan_insn_1): Likewise.
* ggc-page.c (gt_ggc_mx): New helper function.
* stringpool.c (gt_pch_nx): Likewise.
Diffstat (limited to 'gcc/debug.h')
-rw-r--r-- | gcc/debug.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/debug.h b/gcc/debug.h index cd265ff..ad45ea53 100644 --- a/gcc/debug.h +++ b/gcc/debug.h @@ -73,6 +73,10 @@ struct gcc_debug_hooks void (* source_line) (unsigned int line, unsigned int column, const char *file, int discriminator, bool is_stmt); + /* Record a source file location for a DECL_IGNORED_P function. */ + void (* set_ignored_loc) (unsigned int line, unsigned int column, + const char *file); + /* Called at start of prologue code. LINE is the first line in the function. */ void (* begin_prologue) (unsigned int line, unsigned int column, |