On 8/2/21 3:07 PM, Eric Botcazou wrote: >> It was pointed out in PR101598 to be inappropriate, that >> ignored Ada decls receive the source line number which was >> recorded in the function decl's DECL_SOURCE_LOCATION. >> Therefore set all front-end-generated Ada decls with >> DECL_IGNORED_P to UNKNOWN_LOCATION. >> >> 2021-07-24 Bernd Edlinger <bernd.edlin...@hotmail.de> >> >> PR debug/101598 >> * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the >> DECL_SOURCE_LOCATION of DECL_IGNORED_P gnu_subprog_decl to >> UNKNOWN_LOCATION. > > Is that really needed in DWARF 5? If no, I'm not sure that we want it. >
No, this one is completely optional, only DWARF 4 may have additional issues without part 1/2 of this patch. The location of these ignored Ada decls looks completely sane to me. However, it was an unintentional side effect of the patch to allow minimal debugging of ignored decls. This means we can now step into those functions or set line breakpoints there, while previously that was not possible. And I guess it could be considered an improvement. So it's your choice, how you want these functions to be debugged. Thanks Bernd.