This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 29609, being able to set a breakpoint on goto/continue/break
We cannot set a breakpoint on the 'goto' because there is no more
'goto' in
the transformed code. My approach was to force the creation of a
BB for
the goto statement.
And your approach is wrong if using goto_locus works instead.
I still do not understand your approach. You'd like to fix this
issue by correctly setting the locus. I think this is not enough
because there is
no proper generated instruction for the goto/exit/continue
statement. Look on this example:
if (i < 3)
break;
On linux/x86 this generates this code:
cmpl $3, -4(%ebp)
jle .L6
There is no proper insn for the goto statement. 'jle' will always be
executed.