llvm-dwarfdump.rst 4.8 KB

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