third_party/blink/tools/gdb/blink.py
def guess_string_length(ptr):
    """Guess length of string pointed by ptr.

    Returns a tuple of (length, an error message).
    """
    # Try to guess at the length.
    for i in range(0, 2048):
        try:
            if int((ptr + i).dereference()) == 0:
                return i, ''
        except RuntimeError:
            # We indexed into inaccessible memory; give up.
            return i, ' (gdb hit inaccessible memory)'
    return 256, ' (gdb found no trailing NUL)'
Guess length of string pointed by ptr.

    Returns a tuple of (length, an error message).
    
Guess length of string pointed by ptr.
Returns a tuple of (length, an error message).
Guess length of string pointed by ptr . Returns a tuple of ( length an error message ) .
def guess_string_length(ptr):
    for i in range(0, 2048):
        try:
            if int((ptr + i).dereference()) == 0:
                return i, ''
        except RuntimeError:
            return i, ' (gdb hit inaccessible memory)'
    return 256, ' (gdb found no trailing NUL)'
def guess_string_length ( ptr ) : for i in range ( 0 , 2048 ) : try : if int ( ( ptr + i ) . dereference ( ) ) == 0 : return i , '' except RuntimeError : return i , ' (gdb hit inaccessible memory)' return 256 , ' (gdb found no trailing NUL)'
Guess length of string pointed by ptr.
Guess length of string pointed by ptr .
"""Guess length of string pointed by ptr.

    Returns a tuple of (length, an error message).
    """ # Try to guess at the length. # We indexed into inaccessible memory; give up.
ptr