https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82202
Bug ID: 82202
Summary: Missing debug information in offloading compilation
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Target Milestone: ---
I'd noticed this before and now just re-confirmed: to get debug information in
("LTO" model) offloaded code, just "-g" doesn't work, but you have to
explicitly specify "-foffload=-g". I suppose users would expect just "-g" to
do the right thing.
Perhaps that's just missing in the offloading "LTO" option handling code, but I
have not checked that yet (very low priority). I don't think this is an
regressions; I think this has always been like that.
I tested with nvptx offloading only (which uses "DWARF2_ASM_LINE_DEBUG_INFO"),
but would assume that it's a generic problem.