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 Mon, Apr 30, 2007 at 01:54:10PM +0200, Steven Bosscher wrote:
> On 4/30/07, Tristan Gingold <gingold@adacore.com> wrote:
> > 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.
> 
> The locus is on the edge, and we should put the locus from the edge on
> the RTL jump.  Since you don't understand this, I've just taken the
> bug myself.

Stop me if I misunderstand.  But wasn't this bug originally about -O0?
Assuming so, Tristan is correct and his fix of moving the goto into
its own basic block is probably necessary in addition to fixing up the
locus.  Please make sure GDB does not appear to step onto the break at
-O0 when the condition is false.

At -O1, yeah, I don't know what to do about that in GDB really.  I've
wondered if we should annotate conditional jumps and instructions in
debug info as to whether they should be shown when the condition is
false.

-- 
Daniel Jacobowitz
CodeSourcery


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