llvm-dwarfdump.rst 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. llvm-dwarfdump - dump and verify DWARF debug information
  2. ========================================================
  3. .. program:: llvm-dwarfdump
  4. SYNOPSIS
  5. --------
  6. :program:`llvm-dwarfdump` [*options*] [*filename ...*]
  7. DESCRIPTION
  8. -----------
  9. :program:`llvm-dwarfdump` parses DWARF sections in object files,
  10. archives, and `.dSYM` bundles and prints their contents in
  11. human-readable form. Only the .debug_info section is printed unless one of
  12. the section-specific options or :option:`--all` is specified.
  13. If no input file is specified, `a.out` is used instead. If `-` is used as the
  14. input file, :program:`llvm-dwarfdump` reads the input from its standard input
  15. stream.
  16. OPTIONS
  17. -------
  18. .. option:: -a, --all
  19. Disassemble all supported DWARF sections.
  20. .. option:: --arch=<arch>
  21. Dump DWARF debug information for the specified CPU architecture.
  22. Architectures may be specified by name or by number. This
  23. option can be specified multiple times, once for each desired
  24. architecture. All CPU architectures will be printed by
  25. default.
  26. .. option:: -c, --show-children
  27. Show a debug info entry's children when selectively printing with
  28. the `=<offset>` argument of :option:`--debug-info`, or options such
  29. as :option:`--find` or :option:`--name`.
  30. .. option:: --color
  31. Use colors in output.
  32. .. option:: -f <name>, --find=<name>
  33. Search for the exact text <name> in the accelerator tables
  34. and print the matching debug information entries.
  35. When there is no accelerator tables or the name of the DIE
  36. you are looking for is not found in the accelerator tables,
  37. try using the slower but more complete :option:`--name` option.
  38. .. option:: -F, --show-form
  39. Show DWARF form types after the DWARF attribute types.
  40. .. option:: -h, --help
  41. Show help and usage for this command.
  42. .. option:: --help-list
  43. Show help and usage for this command without grouping the options
  44. into categories.
  45. .. option:: -i, --ignore-case
  46. Ignore case distinctions when searching.
  47. .. option:: -n <pattern>, --name=<pattern>
  48. Find and print all debug info entries whose name
  49. (`DW_AT_name` attribute) matches the exact text in
  50. <pattern>. Use the :option:`--regex` option to have
  51. <pattern> become a regular expression for more flexible
  52. pattern matching.
  53. .. option:: --lookup=<address>
  54. Lookup <address> in the debug information and print out the file,
  55. function, block, and line table details.
  56. .. option:: -o <path>
  57. Redirect output to a file specified by <path>, where `-` is the
  58. standard output stream.
  59. .. option:: -p, --show-parents
  60. Show a debug info entry's parents when selectively printing with
  61. the `=<offset>` argument of :option:`--debug-info`, or options such
  62. as :option:`--find` or :option:`--name`.
  63. .. option:: --parent-recurse-depth=<N>
  64. Only recurse to a maximum depth of <N> when displaying parents of
  65. debug info entries.
  66. .. option:: --quiet
  67. Use with :option:`--verify` to not emit to `STDOUT`.
  68. .. option:: -r <N>, --recurse-depth=<N>
  69. Only recurse to a maximum depth of <N> when dumping debug info
  70. entries.
  71. .. option:: --statistics
  72. Collect debug info quality metrics and print the results
  73. as machine-readable single-line JSON output.
  74. .. option:: --summarize-types
  75. Abbreviate the description of type unit entries.
  76. .. option:: -x, --regex
  77. Treat any <pattern> strings as regular expressions when searching
  78. instead of just as an exact string match.
  79. .. option:: -u, --uuid
  80. Show the UUID for each architecture.
  81. .. option:: --diff
  82. Dump the output in a format that is more friendly for comparing
  83. DWARF output from two different files.
  84. .. option:: -v, --verbose
  85. Display verbose information when dumping. This can help to debug
  86. DWARF issues.
  87. .. option:: --verify
  88. Verify the structure of the DWARF information by verifying the
  89. compile unit chains, DIE relationships graph, address
  90. ranges, and more.
  91. .. option:: --version
  92. Display the version of the tool.
  93. .. option:: --debug-abbrev, --debug-addr, --debug-aranges, --debug-cu-index, --debug-frame [=<offset>], --debug-gnu-pubnames, --debug-gnu-pubtypes, --debug-info [=<offset>], --debug-line [=<offset>], --debug-line-str, --debug-loc [=<offset>], --debug-loclists [=<offset>], --debug-macro, --debug-names, --debug-pubnames, --debug-pubtypes, --debug-ranges, --debug-rnglists, --debug-str, --debug-str-offsets, --debug-tu-index, --debug-types, --eh-frame [=<offset>], --gdb-index, --apple-names, --apple-types, --apple-namespaces, --apple-objc
  94. Dump the specified DWARF section by name. Only the
  95. `.debug_info` section is shown by default. Some entries
  96. support adding an `=<offset>` as a way to provide an
  97. optional offset of the exact entry to dump within the
  98. respective section. When an offset is provided, only the
  99. entry at that offset will be dumped, else the entire
  100. section will be dumped.
  101. .. option:: @<FILE>
  102. Read command-line options from `<FILE>`.
  103. EXIT STATUS
  104. -----------
  105. :program:`llvm-dwarfdump` returns 0 if the input files were parsed and dumped
  106. successfully. Otherwise, it returns 1.
  107. SEE ALSO
  108. --------
  109. :manpage:`dsymutil(1)`