Hi,in some cases, a breakpoint can't be set on a continue or break statement. Here is a simple example:
void foc (void)
{
int a, i;
for (i = 1; i <= 10; i++) {
if (i < 3)
a = 1;
else
break; // line 9
a = 5;
}
}
int main(void)
{
foc ();
}
The reason is quiet simple: even at -O0 -g, there is no insn (and no
BB) corresponding to the break/continue statement.
Here is a small patch which fixes the issue.I wonder if this is the right approach. This patch makes the code generated at -O0 uglier...
I think this issue has already been discussed, at least for gcc 3.4 Tristan.
bp.diff
Description: Binary data
