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
- From: Tristan Gingold <gingold at belfast dot act-europe dot fr>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Tristan Gingold <gingold at adacore dot com>
- Date: Mon, 30 Apr 2007 11:13:10 +0200
- Subject: Re: [PATCH] Fix PR 29609, being able to set a breakpoint on goto/continue/break
- References: <7DED6660-B71E-4C19-9AA5-54BCEA20BB62@adacore.com> <200704262304.58461.steven@gcc.gnu.org>
On Thu, Apr 26, 2007 at 11:04:58PM +0200, Steven Bosscher wrote:
> I looked at this bug a bit too. Did you check that we use the goto_locus
> on the edge? I wonder whether this problem goes away if you'd teach
> cfgcleanup to set goto_locus when removing a forwarder. That would IMHO
> be a cleaner solution.
No, we don't use it.
However I still fail to understand how the problem will goes away using this
approach.
The reason of this problem is the merge of the goto statement in the if
statement:
if (cond)
goto lab;
is transformed into:
eval cond; jump_if lab;
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.
Tristan.