()
r"""
    Unfortunately there's not a better way to get at this info.

    >>> gdb.execute('show print elements', from_tty=False, to_string=True)
    'Limit on string chars or array elements to print is 21.\n'
r"""
    Unfortunately there's not a better way to get at this info.
r Unfortunately there s not a better way to get at this info .
def update_length():
    r"""
    Unfortunately there's not a better way to get at this info.

    >>> gdb.execute('show print elements', from_tty=False, to_string=True)
    'Limit on string chars or array elements to print is 21.\n'
    """
    global length
    message = gdb.execute('show print elements', from_tty=False, to_string=True)
    message = message.split('\n')[0].split()[-1]
    message = message.strip('.')
    if message == 'unlimited':
        length = 0
    else:
        length = int(message)
def update_length ( ) : global length message = gdb . execute ( 'show print elements' , from_tty = False , to_string = True ) message = message . split ( '\n' ) [ 0 ] . split ( ) [ - 1 ] message = message . strip ( '.' ) if message == 'unlimited' : length = 0 else : length = int ( message )