Google is committed to advancing racial equity for Black communities. See how.

fx symbol-index

manipulate the symbol-index file

"symbol-index" is a file used by debugging tools (zxdb, fidlcat, symbolizer) to
locate all debugging symbols from different source code checkouts on a local
machine. It's normally located at ~/.fuchsia/debug/symbol-index.

This script interacts with a symbol-index file.

Usage: fx symbol-index <verb> [<arguments> ...]

Available verbs:

  list
      Lists all paths in symbol-index.

  register
      Add all symbols in the current Fuchsia checkout to symbol-index.

  add <symbol path> [ <build directory> ]
      Adds a new symbol path to symbol-index. A symbol path could be either a
      a text file in "ids.txt" format, or a directory in ".build-id" structure.
      An optional build directory could be supplemented, which is used by zxdb
      to locate the source code. If the symbol path is already in symbol-index,
      no changes will be made regardless of the optional build directory.

  add-all [ <input file> ]
      Reads the input and adds all symbol paths with optional build directories.
      The input file can contain multiple lines, each describing a symbol path.
      An optional build directory could be supplemented and separated from the
      symbol path with whitespaces. Relative paths will be resolved based on
      the input file. Empty lines and lines starting with "#" will be ignored.
      If the input file is not specified, the input will be read from the stdin.

  remove <symbol path>
      Removes a symbol path from symbol-index.

  purge
      Removes all non-existent paths from symbol-index.

symbol-index source code