I ran into this same bug again. I am convinced now that it is a bug in the debugger and not the compiler. What I did was to build the same module using my trusty old Watcom compiler. I built, debugged and tested it. The Watcom debugger works and I can step through the code. The Pelles C compiler generates working code and the executable seems to behave correctly. But I can't step through the code that follows the if (exp && exp) which is the same problem I saw before. Below is a fragment of the code that will not accept break points after the if (exp && exp). I can break right at the if (condition) but not even one of the lines within the curly braces will accept a break, though there are many. Once I step beyond the if () line then the next thing I see is that the function has returned and I am no longer even inside that function any more.
//Fount It?
if ((Spc == Ctr->Spc) && (Pag == Adr))
{
register ATE *Ntr,*Ptr; //Nxt,Prv Record Pointers
ub Anc=ate_NxtR(Ctr); //Might need New Beg
//Only One Changes Nothing
if (Atc->Cnt == 1)
return Ctr;
//Can Only Happen When Full
if (Cur == Atc->End)
{
Atc->Beg = ate_NxtR(Ctr);
Atc->End = Atc->Beg;
return Ctr;
}
//Read Nxt & Prv
Nxt=ate_NxtR(Ctr);
Prv=ate_PrvR(Ctr);
//Get Pointers to Nxt & Prv
Ntr = &Atc->Ary[Nxt];
Ptr = &Atc->Ary[Prv];
//Remove Cur from Chain
ate_NxtW(Ptr,Nxt);
ate_PrvW(Ntr,Prv);
//Place between End and its Prv
Nxt = Atc->End;
Ntr = &Atc->Ary[Nxt];
Prv = ate_PrvR(Ntr);
Ptr = &Atc->Ary[Prv];
//Insert Cur
ate_PrvW(Ntr,Cur);
ate_NxtW(Ptr,Cur);
ate_NxtW(Ctr,Nxt);
ate_PrvW(Ctr,Prv);
//New Beg
if (Cur == Atc->Beg)
Atc->Beg = Anc;
//Success
return Ctr;
}