static void sendElement(int fd, MapParse::MapList::const_iterator const& i)
{
    unsigned long start, end;
    start = i->m_start;
    end = i->m_end;
    SendOnceGeneral once = { reinterpret_cast<const void*>(start), end - start, 0x81000000, DATA_ATTR_USER_CONTENT };
    sendTillEnd(fd, reinterpret_cast<const char*>(&once), sizeof(once));
    sendTillEnd(fd, reinterpret_cast<const char*>(start), end - start);
}
void sendStackData(int fd, void** buf, int count, MapParse::MapList const& list)
{
    for (int i = 0; i < count; ++i) {
        ucontext* context = static_cast<ucontext*>(buf[i]);
        unsigned long start = context->uc_mcontext.arm_sp;
        MapParse::MapList::const_iterator found = std::lower_bound(list.begin(), list.end(), start, mycompare);
        if (found != list.end()) {
            if (found->m_start != start)
                --found;
        }
        if ((found->m_start <= start)
            && (found->m_end >= start)
            && ((found->m_protect & 7) == (MapElement::READ | MapElement::WRITE))) {
            SendOnceGeneral once = { reinterpret_cast<void*>(start), found->m_end - start, 0x80000000, DATA_ATTR_USER_CONTENT };
            sendTillEnd(fd, reinterpret_cast<const char*>(&once), sizeof(once));
            sendTillEnd(fd, reinterpret_cast<const char*>(start), found->m_end - start);
        }
    }
}
void sendStackData(int fd, void** buf, int count, const MapElement* list)
{
    for (int i = 0; i < count; ++i) {
        ucontext* context = static_cast<ucontext*>(buf[i]);
        unsigned long start = context->uc_mcontext.arm_sp;
        const MapElement* found = lowerBound(list, start, mycompare);
        if (found != NULL) {
            if (found != list && found->m_start != start)
                found = found->m_prev;
        } else {
            found = list->m_prev;
        }
        if ((found->m_start <= start)
            && (found->m_end >= start)
            && ((found->m_protect & 7) == (MapElement::READ | MapElement::WRITE))) {
            SendOnceGeneral once = { reinterpret_cast<void*>(start), found->m_end - start, 0x80000000, DATA_ATTR_USER_CONTENT };
            sendTillEnd(fd, reinterpret_cast<const char*>(&once), sizeof(once));
            sendTillEnd(fd, reinterpret_cast<const char*>(start), found->m_end - start);
        }
    }
}