llvm-dwarfdump.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. Dump 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 using :option:`--name`.
  47. .. option:: -n <name>, --name=<name>
  48. Find and print all debug info entries whose name
  49. (`DW_AT_name` attribute) is <name>.
  50. .. option:: --lookup=<address>
  51. Look up <address> in the debug information and print out the file,
  52. function, block, and line table details.
  53. .. option:: -o <path>
  54. Redirect output to a file specified by <path>, where `-` is the
  55. standard output stream.
  56. .. option:: -p, --show-parents
  57. Show a debug info entry's parents when selectively printing with
  58. the `=<offset>` argument of :option:`--debug-info`, or options such
  59. as :option:`--find` or :option:`--name`.
  60. .. option:: --parent-recurse-depth=<N>
  61. When displaying debug info entry parents, only show them to a
  62. maximum depth of <N>.
  63. .. option:: --quiet
  64. Use with :option:`--verify` to not emit to `STDOUT`.
  65. .. option:: -r <N>, --recurse-depth=<N>
  66. When displaying debug info entries, only show children to a maximum
  67. depth of <N>.
  68. .. option:: --statistics
  69. Collect debug info quality metrics and print the results
  70. as machine-readable single-line JSON output.
  71. .. option:: --summarize-types
  72. Abbreviate the description of type unit entries.
  73. .. option:: -x, --regex
  74. Treat any <name> strings as regular expressions when searching
  75. with :option:`--name`. If :option:`--ignore-case` is also specified,
  76. the regular expression becomes case-insensitive.
  77. .. option:: -u, --uuid
  78. Show the UUID for each architecture.
  79. .. option:: --diff
  80. Dump the output in a format that is more friendly for comparing
  81. DWARF output from two different files.
  82. .. option:: -v, --verbose
  83. Display verbose information when dumping. This can help to debug
  84. DWARF issues.
  85. .. option:: --verify
  86. Verify the structure of the DWARF information by verifying the
  87. compile unit chains, DIE relationships graph, address
  88. ranges, and more.
  89. .. option:: --version
  90. Display the version of the tool.
  91. .. 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
  92. Dump the specified DWARF section by name. Only the
  93. `.debug_info` section is shown by default. Some entries
  94. support adding an `=<offset>` as a way to provide an
  95. optional offset of the exact entry to dump within the
  96. respective section. When an offset is provided, only the
  97. entry at that offset will be dumped, else the entire
  98. section will be dumped.
  99. .. option:: @<FILE>
  100. Read command-line options from `<FILE>`.
  101. EXIT STATUS
  102. -----------
  103. :program:`llvm-dwarfdump` returns 0 if the input files were parsed and dumped
  104. successfully. Otherwise, it returns 1.
  105. SEE ALSO
  106. --------
  107. :manpage:`dsymutil(1)`