This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v2] [PR debug/67192] Fix C loops' back-jump location
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org, David Malcolm <dmalcolm at redhat dot com>, Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>, Patrick Palka <patrick at parcs dot ath dot cx>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Date: Wed, 04 Nov 2015 15:53:43 +0100
- Subject: Re: [PATCH v2] [PR debug/67192] Fix C loops' back-jump location
- Authentication-results: sourceware.org; auth=none
- References: <m3vb9yq73r dot fsf at oc1027705133 dot ibm dot com> <56322AAD dot 7080002 at redhat dot com> <m3pozx1ot0 dot fsf at oc1027705133 dot ibm dot com>
On Thu, Oct 29 2015, Andreas Arnez wrote:
> On Thu, Oct 29 2015, Bernd Schmidt wrote:
>> [...]
>> i.e. the breakpoint on the code inside the loop is reached before the
>> while statement itself. This may be the expected behaviour with your
>> patch, but I'm not sure it's really desirable for debugging.
>
> [...]
> Maybe we could also improve the behavior of breaking on "while (1)" by
> generating a NOP for it? Or by using the first loop body's token
> instead?
I've basically tried the latter, and it seems to work pretty well. It
solves all the issues discussed in this mail thread, and I haven't found
any other issues with it. I'll post the patch separately.
>> I'd suggest you commit your original patch to fix the
>> misleading-indent problem while we sort this out.
>
> I can certainly do that. But note that the original patch does not
> solve the misleading-indent regression caused for f2() in the new
> version of pr67192.c. Thus the PR is not really fixed by it.
I've slightly changed the test case for that one, so I'll repost it as
well before committing it.
--
Andreas