void dbclose() { dbsave(); CommentClear(); LabelClear(); BookmarkClear(); FunctionClear(); LoopClear(); BpClear(); PatchClear(); }
void FunctionDelRange(uint Start, uint End) { // CHECK: Exported function if(!DbgIsDebugging()) return; // Should all functions be deleted? // 0x00000000 - 0xFFFFFFFF if(Start == 0 && End == ~0) { FunctionClear(); } else { // The start and end address must be in the same module uint moduleBase = ModBaseFromAddr(Start); if(moduleBase != ModBaseFromAddr(End)) return; // Convert these to a relative offset Start -= moduleBase; End -= moduleBase; EXCLUSIVE_ACQUIRE(LockFunctions); for(auto itr = functions.begin(); itr != functions.end();) { const auto & currentFunction = itr->second; // Ignore manually set entries if(currentFunction.manual) { ++itr; continue; } // [Start, End] if(currentFunction.end >= Start && currentFunction.start <= End) itr = functions.erase(itr); else ++itr; } } }
void CheckLists (TowerList *TL, UnitList *UL, UnitList *SQ, PathList *PL, FunctionQueue *FQ) { if (!TowerEmpty(TL)) { TowerClear(TL); } if (!UnitEmpty(UL)) { UnitClear(UL); } if (!UnitEmpty(SQ)) { UnitClear(SQ); } if (!PathEmpty(PL)) { PathClear(PL); } if (!FunctionEmpty(FQ)) { FunctionClear(FQ); } }