mysqld-gdb.py
def std_deque_to_list(std_deque):
    """convert std::deque to list of python"""
    out_list = []
    elttype = std_deque.type.template_argument(0)
    size = elttype.sizeof
    if size < 512:
        buffer_size = int (512 / size)
    else:
        buffer_size = 1
    
    start = std_deque['_M_impl']['_M_start']['_M_cur']
    end = std_deque['_M_impl']['_M_start']['_M_last']
    node = std_deque['_M_impl']['_M_start']['_M_node']
    last = std_deque['_M_impl']['_M_finish']['_M_cur']

    p = start
    while p != last:
        out_list.append(p.dereference())
        p += 1
        if p != end:
            continue
        node += 1
        p = node[0]
        end = p + buffer_size

    return out_list
convert std::deque to list of python
convert std::deque to list of python
convert std :: deque to list of python
def std_deque_to_list(std_deque):
    out_list = []
    elttype = std_deque.type.template_argument(0)
    size = elttype.sizeof
    if size < 512:
        buffer_size = int (512 / size)
    else:
        buffer_size = 1
    start = std_deque['_M_impl']['_M_start']['_M_cur']
    end = std_deque['_M_impl']['_M_start']['_M_last']
    node = std_deque['_M_impl']['_M_start']['_M_node']
    last = std_deque['_M_impl']['_M_finish']['_M_cur']
    p = start
    while p != last:
        out_list.append(p.dereference())
        p += 1
        if p != end:
            continue
        node += 1
        p = node[0]
        end = p + buffer_size
    return out_list
def std_deque_to_list ( std_deque ) : out_list = [ ] elttype = std_deque . type . template_argument ( 0 ) size = elttype . sizeof if size < 512 : buffer_size = int ( 512 / size ) else : buffer_size = 1 start = std_deque [ '_M_impl' ] [ '_M_start' ] [ '_M_cur' ] end = std_deque [ '_M_impl' ] [ '_M_start' ] [ '_M_last' ] node = std_deque [ '_M_impl' ] [ '_M_start' ] [ '_M_node' ] last = std_deque [ '_M_impl' ] [ '_M_finish' ] [ '_M_cur' ] p = start while p != last : out_list . append ( p . dereference ( ) ) p += 1 if p != end : continue node += 1 p = node [ 0 ] end = p + buffer_size return out_list
convert std::deque to list of python
convert std :: deque to list of python
"""convert std::deque to list of python"""
std_deque