fidlcat

```none {: style=”white-space: break-spaces;” .devsite-disable-click-to-copy}

fidlcat [ ] [ command [args] ] fidlcat will run the specified command until it exits. It will intercept and record all fidl calls invoked by the process. The command may be of the form “run “, in which case the given component will be launched. fidlcat will return the code 1 if its parameters are invalid. fidlcat expects a debug agent to be running on the target device. It will return the code 2 if it cannot connect to the debug agent.

  1. __Options:__
  2. ```none {: style="white-space: break-spaces;" .devsite-disable-click-to-copy}
  3. --build-id-dir=<path>
  4. Adds the given directory to the symbol search path. Multiple
  5. --build-id-dir switches can be passed to add multiple directories.
  6. The directory must have the same structure as a .build-id directory,
  7. that is, each symbol file lives at xx/yyyyyyyy.debug where xx is
  8. the first two characters of the build ID and yyyyyyyy is the rest.
  9. However, the name of the directory doesn't need to be .build-id.
  10. --colors=[never|auto|always]
  11. For pretty print, use colors:
  12. - never
  13. - auto: only if running in a terminal (default value)
  14. - always
  15. --columns=<size>
  16. For pretty print, width of the display. By default, on a terminal, use
  17. the terminal width.
  18. --compare=<path>
  19. Compare output with the one stored in the given file
  20. --connect
  21. The host and port of the debug agent running on the target Fuchsia
  22. instance, of the form [<ipv6_addr>]:port.
  23. --dump-messages
  24. Always display the message binary dump even if we can decode the message.
  25. By default the dump is only displayed if we can't decode the message.
  26. --exclude-messages
  27. A regular expression which selects the messages to not display.
  28. If a message method name satisfy the regexp, the message is not displayed
  29. (even if it satifies --messages).
  30. This option can be specified multiple times.
  31. Message filtering works on the method's fully qualified name.
  32. --exclude-syscalls
  33. A regular expression which selects the syscalls to not decode and display.
  34. Can be passed multiple times.
  35. To be displayed, a syscall must verify --syscalls and not verify
  36. --exclude-syscalls.
  37. To display all the syscalls but the zx_handle syscalls, use:
  38. --syscalls=".*" --exclude-syscalls="zx_handle_.*"
  39. --extra-name=<regexp>
  40. Like --remote-name, it monitors some processes. However, for these
  41. processes, monitoring starts only when one of of the "--remote-name"
  42. process is launched. Also, fidlcat stops when the last "--remote-name"
  43. process stops (even if some "--extra-name" processes are still
  44. monitored). You must specify at least one filter with --remote-name if
  45. you use this option (without --remote-name, nothing would be displayed).
  46. --fidl-ir-path=<path>|@argfile
  47. Adds the given path as a repository for FIDL IR, in the form of .fidl.json
  48. files. Passing a file adds the given file. Passing a directory adds all
  49. of the .fidl.json files in that directory and any directory transitively
  50. reachable from there. An argfile contains a newline-separated list of
  51. .fidl.json files relative to the directory containing the argfile; passing
  52. an argfile (starting with the '@' character) adds all files listed in that
  53. argfile. This switch can be passed multiple times to add multiple
  54. locations.
  55. --format=<output>
  56. This option must be used at most once.
  57. The output format can be:
  58. --format=pretty The session is pretty printed (with colors).
  59. This is the default output is --with is not used.
  60. --format=json The session is printed using a json format.
  61. --format=textproto The session is printed using a text protobuf format.
  62. --format=none Nothing is displayed on the standard output (this option only makes sense
  63. when used with --to=<path> or with --with).
  64. When there is no output, fidlcat is much faster (this is better when you
  65. want to monitor real time components).
  66. This is the default output is --with is used.
  67. --from=<source>
  68. This option must be used at most once.
  69. Source can be:
  70. --from=device This is the default input. The input comes from the live monitoring of one or
  71. several processes.
  72. At least one of '--remote-pid', '--remote-name', 'run' must be specified.
  73. --from=<path> The input comes from a previously recorded session (protobuf format). Path gives
  74. the name of the file to read. If path is '-' then the standard input is used.
  75. --help
  76. -h
  77. Prints all command-line switches.
  78. --ids-txt=<path>
  79. Adds the given file to the symbol search path. Multiple --ids-txt
  80. switches can be passed to add multiple files. The file, typically named
  81. "ids.txt", serves as a mapping from build ID to symbol file path and
  82. should contain multiple lines in the format of "<build ID> <file path>".
  83. --log-file=<pathspec>
  84. The name of a file to which the log should be written.
  85. --messages
  86. A regular expression which selects the messages to display.
  87. To display a message, the method name must satisfy the regexp.
  88. This option can be specified multiple times.
  89. Message filtering works on the method's fully qualified name.
  90. --quiet=<number or log level>
  91. The log verbosity. Legal values are "info", "warning", "error", "fatal",
  92. or a number, starting from 0. Extra verbosity comes with lower levels.
  93. --quit-agent-on-exit
  94. Will send a quit message to a connected debug agent in order for it to
  95. shutdown. This is so that fidlcat doesn't leak unwanted debug agents on
  96. "on-the-fly" debugging sessions.
  97. --remote-name=<regexp>
  98. -f <regexp>
  99. Adds a filter to the default job that will cause fidlcat to attach
  100. to existing or future processes whose names match this regexp.
  101. For example:
  102. --remote-name echo_client.*.cmx
  103. --remote-name echo_client
  104. Multiple filters can be specified to match more than one process.
  105. --remote-pid
  106. The koid of the remote process. Can be passed multiple times.
  107. --stack=<value>
  108. The amount of stack frame to display:
  109. - 0: no stack (default value)
  110. - 1: call site (1 to 4 levels)
  111. - 2: full stack frame (adds some overhead)
  112. --stay-alive
  113. Don't quit fidlcat when all the monitored processes have ended. This allows to keep monitoring
  114. upcoming process. At the end you have to use control-c to quit fidlcat. This is useful when
  115. you monitor a process and restart this process.
  116. --symbol-cache=<path>
  117. Directory where we can keep a symbol cache. If a symbol server has been
  118. specified, downloaded symbols will be stored in this directory. The
  119. directory structure will be the same as a .build-id directory, and
  120. symbols will be read from this location as though you had specified
  121. "--build-id-dir=<path>".
  122. --symbol-index=<path>
  123. Populates --ids-txt and --build-id-dir using the given symbol-index file,
  124. which defaults to ~/.fuchsia/debug/symbol-index. The file should be
  125. created and maintained by the "symbol-index" host tool.
  126. --symbol-path=<path>
  127. -s <path>
  128. Adds the given directory or file to the symbol search path. Multiple
  129. -s switches can be passed to add multiple locations. When a directory
  130. path is passed, the directory will be enumerated non-recursively to
  131. index all ELF files. When a file is passed, it will be loaded as an ELF
  132. file (if possible).
  133. --symbol-server=<url>
  134. Adds the given URL to symbol servers. Symbol servers host the debug
  135. symbols for prebuilt binaries and dynamic libraries.
  136. --syscalls
  137. A regular expression which selects the syscalls to decode and display.
  138. Can be passed multiple times.
  139. By default, only zx_channel_.* syscalls are displayed.
  140. To display all the syscalls, use: --syscalls=".*"
  141. --thread
  142. Only display the events for the specified thread.
  143. This option can be specified multiple times to display several threads.
  144. By default all the events are displayed.
  145. --to=<path>
  146. Save the session using protobuf in the specified file. All events are
  147. saved including the messages which have been filtered out by --messages
  148. or --exclude-messages.
  149. --trigger
  150. Start displaying messages and syscalls only when a message for which the
  151. method name satisfies the filter is found.
  152. This option can be specified multiple times.
  153. Message filtering works on the method's fully qualified name.
  154. --verbose=<number or log level>
  155. The log verbosity. Legal values are "info", "warning", "error", "fatal",
  156. or a number, starting from 0. Extra verbosity comes with higher levels
  157. --version
  158. Prints the version.
  159. --with-process-info
  160. Display the process name, process id and thread id on each line.
  161. These options can be used several times.
  162. --with=summary
  163. At the end of the session, a summary of the session is displayed on the standard output.
  164. --with=summary=<path>
  165. Like --with=summary but the result is stored into the file specified by <path>.
  166. --with=top
  167. At the end of the session, generate a view that groups the output by process, protocol, and
  168. method. The groups are sorted by number of events, so groups with more associated events are
  169. listed earlier.
  170. --with=top=<path>
  171. Like --with=top but the result is stored into the file specified by <path>.
  172. --with=group-by-thread
  173. Like For each thread, display a short version of all the events.
  174. --with=group-by-thread=<path>
  175. Like --with=group-by-thread but the result is stored into the file specified by <path>.