1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
Fangrui Song
43ffee6b95 [llvm-symbolizer] Remove one-dash long options
Most modern tools only accept two-dash long options. Remove one-dash
long options which are not recognized by GNU style `getopt_long`.
This ensures long options cannot collide with grouped short options.

Note: llvm-symbolizer has `-demangle={true,false}` for pprof compatibility
(for a while). They are kept.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D106377
2021-07-23 08:35:45 -07:00
gbreynoo
90e3438b60 [llvm-symbolizer] Place Mach-O options into the Mach-O option group.
In the help output of other tools and in the symbolizer command guide,
Mach-O specific options are in their own section. This change fixes the
symbolizer help output to be consistent.

Differential Revision: https://reviews.llvm.org/D102178
2021-05-12 12:04:54 +01:00
Alex Orlov
4e9da478f3 * Add support for JSON output style to llvm-symbolizer
This patch adds JSON output style to llvm-symbolizer to better support CLI automation by providing a machine readable output.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D96883
2021-05-11 13:10:54 +04:00
Amy Huang
b375f49096 Recommit "[llvm-symbolizer] Switch to using native symbolizer by default on Windows"
This reverts commit 1b63177a56e8cd6196778d2b90295f03e96b5800.
2020-11-30 17:36:12 -08:00
Amy Huang
2504c5bf49 Revert "[llvm-symbolizer] Switch to using native symbolizer by default on Windows"
Breaks some asan tests on the buildbot.

This reverts commit c74b427cb2a90309ee0c29df21ad1ca26390263c.
2020-11-23 16:29:45 -08:00
Amy Huang
f6737ef448 [llvm-symbolizer] Switch to using native symbolizer by default on Windows
llvm-symbolizer used to use the DIA SDK for symbolization on
Windows; this patch switches to using native symbolization, which was
implemented recently.

Users can still make the symbolizer use DIA by adding the `-dia` flag
in the LLVM_SYMBOLIZER_OPTS environment variable.

Differential Revision: https://reviews.llvm.org/D91814
2020-11-23 15:57:08 -08:00
Fangrui Song
25dfeb3f99 [llvm-symbolizer] Add back --use-symbol-table=true
It is used by clusterfuzz (https://github.com/google/clusterfuzz/pull/2009/)
and having this compatibility option for a while can help they do bisection
with the latest llvm-symbolizer.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D87067
2020-09-03 14:27:06 -07:00
Fangrui Song
d551fbf23e [llvm-symbolizer] Add back --version and add a -v alias
The switch from llvm::cl to OptTable (D83530) dropped --version, which
is needed by some users.

This patch also adds a -v alias, which is available in GNU addr2line.

The version dumping is similar to llvm-objcopy --version (exotic):

```
llvm-symbolizer
LLVM (http://llvm.org/):
  LLVM version 12.0.0git
  Optimized build with assertions.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake-avx512
```

Reviewed By: dyung, jhenderson

Differential Revision: https://reviews.llvm.org/D85624
2020-08-10 08:21:43 -07:00
Benjamin Kramer
eacb852738 [llvm-symbolizer] Add legacy aliases -demangle=true and -demangle=false.
This is used in the wild, don't break compatibility for no good reason.
https://github.com/google/pprof/blob/master/internal/binutils/addr2liner_llvm.go
2020-08-05 12:07:46 +02:00
Fangrui Song
2f952ff535 [llvm-symbolizer] Add compatibility aliases for --inlining={true,false}
D83530 removed --inlining={true,false} which were used by old asan_symbolize.py script.
Add compatibility aliases so that old asan_symbolize.py and sanitizer
binaries can work with new llvm-symbolizer.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D85228
2020-08-04 11:32:05 -07:00
Fangrui Song
f6b39f50d1 [llvm-symbolizer] Switch command line parsing from llvm::cl to OptTable
for the advantage outlined by D83639 ([OptTable] Support grouped short options)

Some behavior changes:

* -i={0,false} is removed. Use --no-inlines instead.
* --demangle={0,false} is removed. Use --no-demangle instead
* -untag-addresses={0,false} is removed. Use --no-untag-addresses instead

Added a higher level API OptTable::parseArgs which handles optional
initial options populated from an environment variable, expands response
files recursively, and parses options.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D83530
2020-08-04 08:53:15 -07:00