[PATCH] D57049: [llvm-symbolizer] Improve compatibility of llvm-symbolizer --functions with GNU addr2line

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 22 04:59:36 PST 2019


jhenderson created this revision.
jhenderson added reviewers: Quolyk, ruiu, MaskRay, dblaikie, eugene, smeenai.
Herald added a subscriber: rupprecht.

This fixes https://bugs.llvm.org/show_bug.cgi?id=40072.

GNU addr2line's --functions switch is off by default, has a short alias of -f, and does not take an argument. This patch changes llvm-symbolizer to allow the second and third point (changing the default behaviour may have negative impacts on users). If the option is missing a value, it now treats it as "linkage".

This change does cause one previously valid command-line to behave differently. Before `--functions <value>` was accepted, but now only `--functions=<value>` is allowed (as well as `--functions`). The old behaviour will result in the value being treated as a positional argument.

The previous testing for `--functions=short` has been pulled out into a new test that also tests the other accepted values and option formats.


Repository:
  rL LLVM

https://reviews.llvm.org/D57049

Files:
  docs/CommandGuide/llvm-symbolizer.rst
  test/DebugInfo/llvm-symbolizer.test
  test/tools/llvm-symbolizer/Inputs/functions.cpp
  test/tools/llvm-symbolizer/Inputs/functions.o
  test/tools/llvm-symbolizer/functions.test
  tools/llvm-symbolizer/llvm-symbolizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57049.182889.patch
Type: text/x-patch
Size: 4936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190122/21a98e9e/attachment.bin>


More information about the llvm-commits mailing list