private void GetBPAddrRange(FuncBlock fblock) { if (fblock.IsBreakpoint) { bpaddrmin = Math.Max(bpaddrmin, fblock.BPAddress); bpaddrmax = Math.Max(bpaddrmax, fblock.BPAddress); } if (fblock is FuncBlock_ForHeader) { FuncBlock_ForHeader fblockfh = (FuncBlock_ForHeader)fblock; GetBPAddrRange(fblockfh.Start); GetBPAddrRange(fblockfh.Cond); GetBPAddrRange(fblockfh.Next); } if (fblock is FuncBlock_WhileHeader) { FuncBlock_WhileHeader fblockwh = (FuncBlock_WhileHeader)fblock; GetBPAddrRange(fblockwh.Cond); } if (fblock is FuncBlock_IfHeader) { FuncBlock_IfHeader fblockih = (FuncBlock_IfHeader)fblock; GetBPAddrRange(fblockih.Cond); } if (fblock is FuncBlock_WhileEnd) { FuncBlock_WhileEnd fblockwe = (FuncBlock_WhileEnd)fblock; GetBPAddrRange(fblockwe.Cond); } foreach (FuncBlock child in fblock.Childrens) { GetBPAddrRange(child); } }
private void InitBP(FuncBlock fblock) { fblock.IsBreakpoint = false; if (fblock is FuncBlock_ForHeader) { FuncBlock_ForHeader fblockfh = (FuncBlock_ForHeader)fblock; InitBP(fblockfh.Start); InitBP(fblockfh.Cond); InitBP(fblockfh.Next); } if (fblock is FuncBlock_WhileHeader) { FuncBlock_WhileHeader fblockwh = (FuncBlock_WhileHeader)fblock; InitBP(fblockwh.Cond); } if (fblock is FuncBlock_IfHeader) { FuncBlock_IfHeader fblockih = (FuncBlock_IfHeader)fblock; InitBP(fblockih.Cond); } if (fblock is FuncBlock_WhileEnd) { FuncBlock_WhileEnd fblockwe = (FuncBlock_WhileEnd)fblock; InitBP(fblockwe.Cond); } foreach (FuncBlock child in fblock.Childrens) { InitBP(child); } }