]> git.ipfire.org Git - thirdparty/gcc.git/commit
DWARF: late code range fixup
authorAndrew Stubbs <ams@codesourcery.com>
Thu, 4 Mar 2021 23:12:17 +0000 (23:12 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Sat, 6 Mar 2021 15:48:24 +0000 (15:48 +0000)
commitd556f783e9947fece98537f2a335a9af70b52e3b
tree11082fb446298e4d714af0ceb8e02bd48e2dff87
parent58def69b6d68276745e5cc14d6ca24ad47be5d27
DWARF: late code range fixup

Ensure that the parent DWARF subprograms of offload kernel functions have a
code range, and are therefore not discarded by GDB.  This is only necessary
when the parent function does not actually exist in the final binary, which is
commonly the case within the offload device's binary.

This patch replaces 808bdf1bb29 and fdcb23540a2.  It should be squashed with
those before being posted upstream.

gcc/

* gcc/dwarf2out.c (notional_parents_list): New file variable.
(gen_subprogram_die): Record offload kernel functions in
notional_parents_list.
(fixup_notional_parents): New function.
(dwarf2out_finish): Call fixup_notional_parents.
(dwarf2out_c_finalize): Reset notional_parents_list.
gcc/dwarf2out.c