void dbclose() { dbsave(); CommentClear(); LabelClear(); BookmarkClear(); FunctionClear(); LoopClear(); BpClear(); PatchClear(); }
void CommentDelRange(uint Start, uint End) { // CHECK: Export function if(!DbgIsDebugging()) return; // Are all comments going to be deleted? // 0x00000000 - 0xFFFFFFFF if(Start == 0 && End == ~0) { CommentClear(); } else { // Make sure 'Start' and 'End' reference the same module uint moduleBase = ModBaseFromAddr(Start); if(moduleBase != ModBaseFromAddr(End)) return; // Virtual -> relative offset Start -= moduleBase; End -= moduleBase; EXCLUSIVE_ACQUIRE(LockComments); for(auto itr = comments.begin(); itr != comments.end();) { // Ignore manually set entries if(itr->second.manual) { itr++; continue; } // [Start, End) if(itr->second.addr >= Start && itr->second.addr < End) itr = comments.erase(itr); else itr++; } } }