llvm-project

Форк
0
84 строки · 5.1 Кб
1
include "llvm/Option/OptParser.td"
2

3
multiclass B<string name, string help1, string help2> {
4
  def NAME: Flag<["--"], name>, HelpText<help1>;
5
  def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
6
}
7

8
multiclass Eq<string name, string help> {
9
  def NAME #_EQ : Joined<["--"], name #"=">,
10
                  HelpText<help>;
11
  def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
12
}
13

14
class F<string name, string help>: Flag<["--"], name>, HelpText<help>;
15

16
def grp_mach_o : OptionGroup<"kind">,
17
                 HelpText<"llvm-symbolizer Mach-O Specific Options">;
18

19
def addresses : F<"addresses", "Show address before line information">;
20
defm adjust_vma
21
    : Eq<"adjust-vma", "Add specified offset to object file addresses">,
22
      MetaVarName<"<offset>">;
23
def basenames : Flag<["--"], "basenames">, HelpText<"Strip directory names from paths">;
24
defm build_id : Eq<"build-id", "Build ID used to look up the object file">;
25
defm cache_size : Eq<"cache-size", "Max size in bytes of the in-memory binary cache.">;
26
def color : F<"color", "Use color when symbolizing log markup.">;
27
def color_EQ : Joined<["--"], "color=">, HelpText<"Whether to use color when symbolizing log markup: always, auto, never">, Values<"always,auto,never">;
28
defm debug_file_directory : Eq<"debug-file-directory", "Path to directory where to look for debug files">, MetaVarName<"<dir>">;
29
defm debuginfod : B<"debuginfod", "Use debuginfod to find debug binaries", "Don't use debuginfod to find debug binaries">;
30
defm default_arch
31
    : Eq<"default-arch", "Default architecture (for multi-arch objects)">,
32
      Group<grp_mach_o>;
33
defm demangle : B<"demangle", "Demangle function names", "Don't demangle function names">;
34
def filter_markup : Flag<["--"], "filter-markup">, HelpText<"Filter symbolizer markup from stdin.">;
35
def functions : F<"functions", "Print function name for a given address">;
36
def functions_EQ : Joined<["--"], "functions=">, HelpText<"Print function name for a given address">, Values<"none,short,linkage">;
37
def help : F<"help", "Display this help">;
38
defm dwp : Eq<"dwp", "Path to DWP file to be use for any split CUs">, MetaVarName<"<file>">;
39
defm dsym_hint
40
    : Eq<"dsym-hint",
41
         "Path to .dSYM bundles to search for debug info for the object files">,
42
      MetaVarName<"<dir>">,
43
      Group<grp_mach_o>;
44
defm fallback_debug_path : Eq<"fallback-debug-path", "Fallback path for debug binaries">, MetaVarName<"<dir>">;
45
defm inlines : B<"inlines", "Print all inlined frames for a given address",
46
                 "Do not print inlined frames">;
47
defm obj
48
    : Eq<"obj", "Path to object file to be symbolized (if not provided, "
49
                "object file should be specified for each input line)">, MetaVarName<"<file>">;
50
defm output_style
51
    : Eq<"output-style", "Specify print style. Supported styles: LLVM, GNU, JSON">,
52
      MetaVarName<"style">,
53
      Values<"LLVM,GNU,JSON">;
54
def pretty_print : F<"pretty-print", "Make the output more human friendly">;
55
defm print_source_context_lines : Eq<"print-source-context-lines", "Print N lines of source file context">;
56
def relative_address : F<"relative-address", "Interpret addresses as addresses relative to the image base">;
57
def relativenames : F<"relativenames", "Strip the compilation directory from paths">;
58
defm untag_addresses : B<"untag-addresses", "", "Remove memory tags from addresses before symbolization">;
59
def use_dia: F<"dia", "Use the DIA library to access symbols (Windows only)">;
60
def verbose : F<"verbose", "Print verbose line info">;
61
def version : F<"version", "Display the version">;
62

63
def : Flag<["-"], "a">, Alias<addresses>, HelpText<"Alias for --addresses">;
64
def : F<"print-address", "Alias for --addresses">, Alias<addresses>;
65
def : Flag<["-"], "C">, Alias<demangle>, HelpText<"Alias for --demangle">;
66
def : Joined<["--"], "exe=">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;
67
def : Separate<["--"], "exe">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;
68
def : JoinedOrSeparate<["-"], "e">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;
69
def : Joined<["-"], "e=">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;
70
def : Flag<["-"], "f">, Alias<functions>, HelpText<"Alias for --functions">;
71
def : Joined<["-"], "f=">, Alias<functions_EQ>, HelpText<"Alias for --functions=">;
72
def : Flag<["-"], "h">, Alias<help>;
73
def : Flag<["-"], "i">, Alias<inlines>, HelpText<"Alias for --inlines">;
74
def : F<"inlining", "Alias for --inlines">, Alias<inlines>;
75
def : Flag<["-"], "p">, Alias<pretty_print>, HelpText<"Alias for --pretty-print">;
76
def : Flag<["-"], "s">, Alias<basenames>, HelpText<"Alias for --basenames">;
77
def : Flag<["-"], "v">, Alias<version>, HelpText<"Alias for --version">;
78

79
// Compatibility aliases for old asan_symbolize.py and sanitizer binaries (before 2020-08).
80
def : Flag<["--"], "inlining=true">, Alias<inlines>, HelpText<"Alias for --inlines">;
81
def : Flag<["--"], "inlining=false">, Alias<no_inlines>, HelpText<"Alias for --no-inlines">;
82
// Compatibility aliases for pprof's symbolizer.
83
def : Flag<["-"], "demangle=true">, Alias<demangle>, HelpText<"Alias for --demangle">;
84
def : Flag<["-"], "demangle=false">, Alias<no_demangle>, HelpText<"Alias for --no-demangle">;
85

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.