brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.6 KiB · 10f1e6d Raw
91 lines · plain
1include "llvm/Option/OptParser.td"2 3multiclass 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 8multiclass 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 14class F<string name, string help>: Flag<["--"], name>, HelpText<help>;15 16def grp_mach_o : OptionGroup<"kind">,17                 HelpText<"llvm-symbolizer Mach-O Specific Options">;18 19def grp_gsym : OptionGroup<"kind">,20               HelpText<"llvm-symbolizer GSYM Related Options">;21 22def addresses : F<"addresses", "Show address before line information">;23defm adjust_vma24    : Eq<"adjust-vma", "Add specified offset to object file addresses">,25      MetaVarName<"<offset>">;26def basenames : Flag<["--"], "basenames">, HelpText<"Strip directory names from paths">;27defm build_id : Eq<"build-id", "Build ID used to look up the object file">;28defm cache_size : Eq<"cache-size", "Max size in bytes of the in-memory binary cache.">;29def color : F<"color", "Use color when symbolizing log markup.">;30def color_EQ : Joined<["--"], "color=">, HelpText<"Whether to use color when symbolizing log markup: always, auto, never">, Values<"always,auto,never">;31defm debug_file_directory : Eq<"debug-file-directory", "Path to directory where to look for debug files">, MetaVarName<"<dir>">;32defm debuginfod : B<"debuginfod", "Use debuginfod to find debug binaries", "Don't use debuginfod to find debug binaries">;33defm default_arch34    : Eq<"default-arch", "Default architecture (for multi-arch objects)">,35      Group<grp_mach_o>;36defm demangle : B<"demangle", "Demangle function names", "Don't demangle function names">;37def disable_gsym : F<"disable-gsym", "Don't consider using GSYM files for symbolication">, Group<grp_gsym>;38def filter_markup : Flag<["--"], "filter-markup">, HelpText<"Filter symbolizer markup from stdin.">;39def functions : F<"functions", "Print function name for a given address">;40def functions_EQ : Joined<["--"], "functions=">, HelpText<"Print function name for a given address">, Values<"none,short,linkage">;41defm gsym_file_directory : Eq<"gsym-file-directory", "Path to directory where to look for GSYM files">, MetaVarName<"<dir>">, Group<grp_gsym>;42def help : F<"help", "Display this help">;43defm dwp : Eq<"dwp", "Path to DWP file to be use for any split CUs">, MetaVarName<"<file>">;44defm dsym_hint45    : Eq<"dsym-hint",46         "Path to .dSYM bundles to search for debug info for the object files">,47      MetaVarName<"<dir>">,48      Group<grp_mach_o>;49defm fallback_debug_path : Eq<"fallback-debug-path", "Fallback path for debug binaries">, MetaVarName<"<dir>">;50defm inlines : B<"inlines", "Print all inlined frames for a given address",51                 "Do not print inlined frames">;52defm obj53    : Eq<"obj", "Path to object file to be symbolized (if not provided, "54                "object file should be specified for each input line)">, MetaVarName<"<file>">;55defm output_style56    : Eq<"output-style", "Specify print style. Supported styles: LLVM, GNU, JSON">,57      MetaVarName<"style">,58      Values<"LLVM,GNU,JSON">;59def pretty_print : F<"pretty-print", "Make the output more human friendly">;60defm print_source_context_lines : Eq<"print-source-context-lines", "Print N lines of source file context">;61def relative_address : F<"relative-address", "Interpret addresses as addresses relative to the image base">;62def relativenames : F<"relativenames", "Strip the compilation directory from paths">;63def skip_line_zero : F<"skip-line-zero","If an address does not have an associated line number, use the last line number from the current sequence in the line-table">;64defm untag_addresses : B<"untag-addresses", "", "Remove memory tags from addresses before symbolization">;65def use_dia: F<"dia", "Use the DIA library to access symbols (Windows only)">;66def verbose : F<"verbose", "Print verbose line info">;67def version : F<"version", "Display the version">;68 69def : Flag<["-"], "a">, Alias<addresses>, HelpText<"Alias for --addresses">;70def : F<"print-address", "Alias for --addresses">, Alias<addresses>;71def : Flag<["-"], "C">, Alias<demangle>, HelpText<"Alias for --demangle">;72def : Joined<["--"], "exe=">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;73def : Separate<["--"], "exe">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;74def : JoinedOrSeparate<["-"], "e">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;75def : Joined<["-"], "e=">, Alias<obj_EQ>, HelpText<"Alias for --obj">, MetaVarName<"<file>">;76def : Flag<["-"], "f">, Alias<functions>, HelpText<"Alias for --functions">;77def : Joined<["-"], "f=">, Alias<functions_EQ>, HelpText<"Alias for --functions=">;78def : Flag<["-"], "h">, Alias<help>;79def : Flag<["-"], "i">, Alias<inlines>, HelpText<"Alias for --inlines">;80def : F<"inlining", "Alias for --inlines">, Alias<inlines>;81def : Flag<["-"], "p">, Alias<pretty_print>, HelpText<"Alias for --pretty-print">;82def : Flag<["-"], "s">, Alias<basenames>, HelpText<"Alias for --basenames">;83def : Flag<["-"], "v">, Alias<version>, HelpText<"Alias for --version">;84 85// Compatibility aliases for old asan_symbolize.py and sanitizer binaries (before 2020-08).86def : Flag<["--"], "inlining=true">, Alias<inlines>, HelpText<"Alias for --inlines">;87def : Flag<["--"], "inlining=false">, Alias<no_inlines>, HelpText<"Alias for --no-inlines">;88// Compatibility aliases for pprof's symbolizer.89def : Flag<["-"], "demangle=true">, Alias<demangle>, HelpText<"Alias for --demangle">;90def : Flag<["-"], "demangle=false">, Alias<no_demangle>, HelpText<"Alias for --no-demangle">;91