https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93865

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 7 Sep 2020, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93865
> 
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |jakub at gcc dot gnu.org
> 
> --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> I guess this isn't only about the main source files, but about any includes 
> (if
> they are relative, not absolute).
> Perhaps when streaming out lto we should stream for each TU also the
> get_src_pwd () string, and in canon_file_name in lto-streamer-in.c take into
> account the src pwd read from the current TU vs. get_src_pwd () for the LTO
> link.
> If they are the same, don't do any changes, similarly for absolute paths no
> difference, otherwise canonicalize relative paths for the difference in the
> paths.

Something like that - but note that there's another "copy" of .debug_line
in the early debug data (but with "correct" CWD).  Note one "natural" 
place to stream the CWD string is attached to the TRANSLATION_UNIT_DECL,
but then streaming the original location file and intending to massage
it later is probably awkward which means the easiest fix would certainly
be to canonicalize / concat CWD and location file at location stream out
time.  The question is whether we want to "undo" / re-canonicalize
any of that afterwards (and what "CWD" to use for the LTRANS .debug_line).

Reply via email to