This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR 29609, being able to set a breakpoint on goto/continue/break


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]