tools/python/llvm_symbolizer.py
def GetSymbolInformation(self, lib, addr):
    """Return the corresponding function names and line numbers.

    Args:
      lib: library to search for info.
      addr: address to look for info.

    Returns:
      A list of (function name, line numbers) tuple.
    """
    if (self._llvm_symbolizer_subprocess is None or not lib
        or not _CheckValidAddr(addr) or not os.path.isfile(lib)):
      return [(_UNKNOWN, lib)]

    proc = self._llvm_symbolizer_subprocess
    with self._lock:
      proc.stdin.write('%s %s\n' % (lib, addr))
      proc.stdin.flush()
      result = []
      # Read until an empty line is observed, which indicates the end of the
      # output. Each line with a function name is always followed by one line
      # with the corresponding line number.
      while True:
        line = proc.stdout.readline()
        if line != '\n':
          line_numbers = proc.stdout.readline()
          result.append((line[:-1], line_numbers[:-1]))
        else:
          return result
Return the corresponding function names and line numbers.

    Args:
      lib: library to search for info.
      addr: address to look for info.

    Returns:
      A list of (function name, line numbers) tuple.
    
Return the corresponding function names and line numbers.
Return the corresponding function names and line numbers .
def GetSymbolInformation(self, lib, addr):
    if (self._llvm_symbolizer_subprocess is None or not lib
        or not _CheckValidAddr(addr) or not os.path.isfile(lib)):
      return [(_UNKNOWN, lib)]
    proc = self._llvm_symbolizer_subprocess
    with self._lock:
      proc.stdin.write('%s %s\n' % (lib, addr))
      proc.stdin.flush()
      result = []
      while True:
        line = proc.stdout.readline()
        if line != '\n':
          line_numbers = proc.stdout.readline()
          result.append((line[:-1], line_numbers[:-1]))
        else:
          return result
def GetSymbolInformation ( self , lib , addr ) : if ( self . _llvm_symbolizer_subprocess is None or not lib or not _CheckValidAddr ( addr ) or not os . path . isfile ( lib ) ) : return [ ( _UNKNOWN , lib ) ] proc = self . _llvm_symbolizer_subprocess with self . _lock : proc . stdin . write ( '%s %s\n' % ( lib , addr ) ) proc . stdin . flush ( ) result = [ ] while True : line = proc . stdout . readline ( ) if line != '\n' : line_numbers = proc . stdout . readline ( ) result . append ( ( line [ : - 1 ] , line_numbers [ : - 1 ] ) ) else : return result
Return the corresponding function names and line numbers.
Return the corresponding function names and line numbers .
"""Return the corresponding function names and line numbers.

    Args:
      lib: library to search for info.
      addr: address to look for info.

    Returns:
      A list of (function name, line numbers) tuple.
    """ # Read until an empty line is observed, which indicates the end of the # output. Each line with a function name is always followed by one line # with the corresponding line number.
A list of (function name, line numbers) tuple.
A list of ( function name line numbers ) tuple .
self
lib
library to search for info.
library to search for info .
addr
address to look for info.
address to look for info .