Ejemplo n.º 1
0
void dbclose()
{
    dbsave();
    CommentClear();
    LabelClear();
    BookmarkClear();
    FunctionClear();
    LoopClear();
    BpClear();
    PatchClear();
}
Ejemplo n.º 2
0
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;
        }
    }
}
Ejemplo n.º 3
0
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);
    }
}