third_party/blink/tools/gdb/blink.py
def lstring_to_string(ptr, length=None):
    """Convert a pointer to LChar* data into a Python (non-Unicode) string.

    ptr and length are both gdb.Value objects.
    If length is unspecified, will guess at the length."""
    error_message = ''
    if length is None:
        length, error_message = guess_string_length(ptr)
    else:
        length = int(length)
    string = ''.join([chr((ptr + i).dereference()) for i in range(length)])
    return string + error_message
Convert a pointer to LChar* data into a Python (non-Unicode) string.

    ptr and length are both gdb.Value objects.
    If length is unspecified, will guess at the length.
Convert a pointer to LChar* data into a Python (non-Unicode) string.
ptr and length are both gdb.Value objects.
If length is unspecified, will guess at the length.
Convert a pointer to LChar * data into a Python ( non - Unicode ) string . ptr and length are both gdb . Value objects . If length is unspecified will guess at the length .
def lstring_to_string(ptr, length=None):
    error_message = ''
    if length is None:
        length, error_message = guess_string_length(ptr)
    else:
        length = int(length)
    string = ''.join([chr((ptr + i).dereference()) for i in range(length)])
    return string + error_message
def lstring_to_string ( ptr , length = None ) : error_message = '' if length is None : length , error_message = guess_string_length ( ptr ) else : length = int ( length ) string = '' . join ( [ chr ( ( ptr + i ) . dereference ( ) ) for i in range ( length ) ] ) return string + error_message
Convert a pointer to LChar* data into a Python (non-Unicode) string.
Convert a pointer to LChar * data into a Python ( non - Unicode ) string .
"""Convert a pointer to LChar* data into a Python (non-Unicode) string.

    ptr and length are both gdb.Value objects.
    If length is unspecified, will guess at the length."""
ptr
length