Remove misleading debug line entries
commit2e6562043c48c0ae6bc9823d438685269eb11aab
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 7 Dec 2020 11:00:00 +0000 (7 12:00 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 10 Dec 2020 12:44:39 +0000 (10 13:44 +0100)
tree07d50e82b640b2152ad9a7a0b6738ec3dca58e12
parenta1fb16e5472fded44181dd8938f2ba3cbe9844b6
Remove misleading debug line entries

This removes gimple_debug_begin_stmts without block info which remain
after a gimple block originating from an inline function is unused.

The line numbers from these stmts are from the inline function,
but since the inline function is completely optimized away,
there will be no DW_TAG_inlined_subroutine so the debugger has
no callstack available at this point, and therefore those
line table entries are not helpful to the user.

2020-12-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>

* cfgexpand.c (expand_gimple_basic_block): Remove special handling
of debug_inline_entries without block info.
* tree-inline.c (remap_gimple_stmt): Drop debug_nonbind_markers when
the call statement has no block info.
(copy_debug_stmt): Remove debug_nonbind_markers when inlining
and the block info is mapped to NULL.
* tree-ssa-live.c (clear_unused_block_pointer): Remove
debug_nonbind_markers originating from removed inline functions.
gcc/cfgexpand.c
gcc/tree-inline.c
gcc/tree-ssa-live.c