parameters: (ptr, length=None)
return_statement: return string + error_message
docstring: 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.
docstring_summary: Convert a pointer to LChar* data into a Python (non-Unicode) string.
docstring_tokens: Convert a pointer to LChar * data into a Python ( non - Unicode ) string .
function: 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
function_tokens: 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