xref: /llvm-project/llvm/docs/CommandGuide/llvm-addr2line.rst (revision 9a709dd2bb452883e1f1cf626d60c3f03801a9f3)
1a28b8d78SJordan Rupprechtllvm-addr2line - a drop-in replacement for addr2line
2a28b8d78SJordan Rupprecht====================================================
3a28b8d78SJordan Rupprecht
4a28b8d78SJordan Rupprecht.. program:: llvm-addr2line
5a28b8d78SJordan Rupprecht
6a28b8d78SJordan RupprechtSYNOPSIS
7a28b8d78SJordan Rupprecht--------
8a28b8d78SJordan Rupprecht
9a28b8d78SJordan Rupprecht:program:`llvm-addr2line` [*options*]
10a28b8d78SJordan Rupprecht
11a28b8d78SJordan RupprechtDESCRIPTION
12a28b8d78SJordan Rupprecht-----------
13a28b8d78SJordan Rupprecht
14a28b8d78SJordan Rupprecht:program:`llvm-addr2line` is an alias for the :manpage:`llvm-symbolizer(1)`
15a28b8d78SJordan Rupprechttool with different defaults. The goal is to make it a drop-in replacement for
16a28b8d78SJordan RupprechtGNU's :program:`addr2line`.
17a28b8d78SJordan Rupprecht
18a28b8d78SJordan RupprechtHere are some of those differences:
19a28b8d78SJordan Rupprecht
20*9a709dd2SRichard Smith-  ``llvm-addr2line`` interprets all addresses as hexadecimal and ignores an
21*9a709dd2SRichard Smith   optional ``0x`` prefix, whereas ``llvm-symbolizer`` attempts to determine
22*9a709dd2SRichard Smith   the base from the literal's prefix and defaults to decimal if there is no
23*9a709dd2SRichard Smith   prefix.
24*9a709dd2SRichard Smith
2511ccad6eSRichard Smith-  ``llvm-addr2line`` defaults not to print function names. Use `-f`_ to enable
2611ccad6eSRichard Smith   that.
27a28b8d78SJordan Rupprecht
2811ccad6eSRichard Smith-  ``llvm-addr2line`` defaults not to demangle function names. Use `-C`_ to
2911ccad6eSRichard Smith   switch the demangling on.
30a28b8d78SJordan Rupprecht
3111ccad6eSRichard Smith-  ``llvm-addr2line`` defaults not to print inlined frames. Use `-i`_ to show
3211ccad6eSRichard Smith   inlined frames for a source code location in an inlined function.
33a28b8d78SJordan Rupprecht
3411ccad6eSRichard Smith-  ``llvm-addr2line`` uses `--output-style=GNU`_ by default.
35a28b8d78SJordan Rupprecht
3611ccad6eSRichard Smith-  ``llvm-addr2line`` parses options from the environment variable
3711ccad6eSRichard Smith   ``LLVM_ADDR2LINE_OPTS`` instead of from ``LLVM_SYMBOLIZER_OPTS``.
38dedad08eSPetr Hosek
39a28b8d78SJordan RupprechtSEE ALSO
40a28b8d78SJordan Rupprecht--------
41a28b8d78SJordan Rupprecht
42a28b8d78SJordan Rupprecht:manpage:`llvm-symbolizer(1)`
43a28b8d78SJordan Rupprecht
44a28b8d78SJordan Rupprecht.. _-f: llvm-symbolizer.html#llvm-symbolizer-opt-f
45a28b8d78SJordan Rupprecht.. _-C: llvm-symbolizer.html#llvm-symbolizer-opt-c
46a28b8d78SJordan Rupprecht.. _-i: llvm-symbolizer.html#llvm-symbolizer-opt-i
47a28b8d78SJordan Rupprecht.. _--output-style=GNU: llvm-symbolizer.html#llvm-symbolizer-opt-output-style
48