This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Update source location for PRE inserted stmt
> Those compiler generated statements do not have source origins, but
> they need to have debug location information attached so that
> information collected for them can be correlated with program
> constructs (such as CFG). One of the natural way is to use the source
> location associated with the program point where they are inserted.
No, there is nothing natural (and this can even be wrong). The statements
must have the source location corresponding to the source construct they are
generated for, which may be totally different from that of the insertion
point. Yes, that can generate jumpiness in GDB, but this is far better that
breaking the coverage info by giving the same source location to instructions
that have different coverage status.
--
Eric Botcazou