summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-symbolizer] SimplifyFangrui Song2018-05-261-1/+1
| | | | llvm-svn: 333334
* [llvm-symbolizer] Simplify. NFCFangrui Song2018-05-251-10/+5
| | | | llvm-svn: 333247
* Define InitLLVM to do common initialization all at once.Rui Ueyama2018-04-131-7/+2
| | | | | | | | | | | We have a few functions that virtually all command wants to run on process startup/shutdown. This patch adds InitLLVM class to do that all at once, so that we don't need to copy-n-paste boilerplate code to each llvm command's main() function. Differential Revision: https://reviews.llvm.org/D45602 llvm-svn: 330046
* DebugInfo: Provide option for explicitly specifying the name of the DWP fileDavid Blaikie2017-07-301-2/+8
| | | | | | | | | | | | | | | | If you've archived the DWP file somewhere it's probably useful to be able to just tell llvm-symbolizer where it is when you're symbolizing stack traces from the binary. This only provides a mechanism for specifying a single DWP file, good if you're symbolizing a program with a single DWP file, but it's likely if the program is dynamically linked that you might have a DWP for each dynamic library - in which case this feature won't help (at least as it's surfaced in llvm-symbolizer for now) - in theory it could be extended to specify a collection of DWP files that could all be consulted for split CU hash resolution. llvm-svn: 309498
* Add a verbose/human readable mode to llvm-symbolizer to investigate ↵David Blaikie2017-01-311-1/+4
| | | | | | | | | | discriminators and other line table/backtrace features Patch by Simon Que! Differential Revision: https://reviews.llvm.org/D29094 llvm-svn: 293697
* Turn cl::values() (for enum) from a vararg function to using C++ variadic ↵Mehdi Amini2016-10-081-2/+1
| | | | | | | | | | | | | | | template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 llvm-svn: 283671
* Search for llvm-symbolizer binary in the same directory as argv[0], beforeRichard Smith2016-06-091-1/+1
| | | | | | | looking for it along $PATH. This allows installs of LLVM tools outside of $PATH to find the symbolizer and produce pretty backtraces if they crash. llvm-svn: 272232
* [Symbolize] Check if the PE file has a PDB and emit an error if we can't load itReid Kleckner2016-06-031-6/+8
| | | | | | | | | | | | | | | | | | | | | Summary: Previously we would try to load PDBs for every PE executable we tried to symbolize. If that failed, we would fall back to DWARF. If there wasn't any DWARF, we'd print mostly useless symbol information using the export table. With this change, we only try to load PDBs for executables that claim to have them. If that fails, we can now print an error rather than falling back silently. This should make it a lot easier to diagnose and fix common symbolization issues, such as not having DIA or not having a PDB. Reviewers: zturner, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20982 llvm-svn: 271725
* [llvm-symbolizer] -print-source-context-lines option to print source code ↵Mike Aizatsky2016-01-091-1/+5
| | | | | | | | around the line. Differential Revision: http://reviews.llvm.org/D15909 llvm-svn: 257236
* [llvm-symbolizer] Print out non-address lines verbatim.Mike Aizatsky2016-01-071-13/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D15876 llvm-svn: 257115
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-111-2/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252798
* Reverting r252760Colin LeMahieu2015-11-111-9/+2
| | | | llvm-svn: 252770
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-111-2/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252760
* [LLVMSymbolize] Properly propagate object parsing errors from the library.Alexey Samsonov2015-11-041-3/+14
| | | | llvm-svn: 252021
* [LLVMSymbolize] Factor out the logic for printing structs from DIContext. NFC.Alexey Samsonov2015-11-031-6/+11
| | | | | | | | Introduce DIPrinter which takes care of rendering DILineInfo and friends. This allows LLVMSymbolizer class to return a structured data instead of plain std::strings. llvm-svn: 251989
* Let the users of LLVMSymbolizer decide whether they want to symbolize ↵Alexey Samsonov2015-10-301-3/+4
| | | | | | | | | | | inlined frames. Introduce LLVMSymbolizer::symbolizeInlinedCode() instead of switching on PrintInlining option passed to the constructor. This will be needed once we retrun structured data (instead of std::string) from LLVMSymbolizer and move printing logic out. llvm-svn: 251675
* Move parts of llvm-symbolizer tool into LLVMSymbolize library.Alexey Samsonov2015-10-261-1/+1
| | | | | | | | | | | | Summary: See http://lists.llvm.org/pipermail/llvm-dev/2015-October/091624.html Reviewers: echristo Subscribers: llvm-commits, aizatsky Differential Revision: http://reviews.llvm.org/D13998 llvm-svn: 251316
* Simplify boolean conditional return statements in tools/llvm-symbolizer.Rafael Espindola2015-10-241-3/+1
| | | | | | Patch by Richard. llvm-svn: 251216
* [llvm-symbolizer] Add -print-address optionHemant Kulkarni2015-10-121-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D13518 llvm-svn: 250086
* [llvm-symbolizer] Reverting r250067Colin LeMahieu2015-10-121-8/+0
| | | | llvm-svn: 250072
* [llvm-symbolizer] Add -print-address optionHemant Kulkarni2015-10-121-0/+8
| | | | | | Differential Revision http://reviews.llvm.org/D13518 llvm-svn: 250067
* A few fixes for llvm-symbolizer on Windows.Zachary Turner2015-05-061-4/+10
| | | | | | | | | Specifically, this patch correctly respects the -demangle option, and additionally adds a hidden --relative-address option allows input addresses to be relative to the module load address instead of absolute addresses into the image. llvm-svn: 236653
* Make llvm-symbolizer work on Windows.Zachary Turner2015-04-271-0/+4
| | | | | | | Differential Revision: http://reviews.llvm.org/D9234 Reviewed By: Alexey Samsonov llvm-svn: 235900
* Purge unused includes throughout libSupport.Benjamin Kramer2015-03-231-0/+1
| | | | | | NFC. llvm-svn: 232976
* [llvm-symbolizer] Introduce the -dsym-hint option.Alexander Potapenko2014-10-171-0/+14
| | | | | | | llvm-symbolizer will consult one of the .dSYM paths passed via -dsym-hint if it fails to find the .dSYM bundle at the default location. llvm-svn: 220004
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-131-1/+0
| | | | llvm-svn: 210876
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* [DWARF parser] Teach DIContext to fetch short (non-linkage) function names ↵Alexey Samsonov2014-05-171-4/+9
| | | | | | | | | | for a given address. Change --functions option in llvm-symbolizer tool to accept values "none", "short" or "linkage". Update the tests and docs accordingly. llvm-svn: 209050
* [C++] Use 'nullptr'. Tools edition.Craig Topper2014-04-251-1/+1
| | | | llvm-svn: 207176
* llvm-symbolizer: add --obj flag to specify a single object file that should ↵Alexey Samsonov2013-12-241-17/+24
| | | | | | be symbolized. llvm-svn: 197988
* llvm-symbolizer: add support for Mach-O universal binariesAlexey Samsonov2013-06-281-1/+5
| | | | llvm-svn: 185137
* llvm-symbolizer: correctly parse filenames given in quotesAlexey Samsonov2013-04-051-5/+18
| | | | llvm-svn: 178859
* clang-formatize llvm-symbolizer codeAlexey Samsonov2013-02-151-11/+9
| | | | llvm-svn: 175255
* llvm-symbolizer: factor out bits of the tool into separate ↵Alexey Samsonov2013-01-221-288/+20
| | | | | | LLVMSymbolize.{h,cpp} files. No functionality change. llvm-svn: 173159
* llvm-symbolizer: add DATA command that allows to symbolize global variables.Dmitry Vyukov2013-01-111-34/+88
| | | | | | | | | | Example: >DATA bin/clang 0x26e8e40 <llvm::SparcSubTypeKV <40799808 416 The last line is address and size of the object. llvm-svn: 172180
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-1/+0
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
* Rewrite DIContext interface to take an object. Update all callers.Eric Christopher2012-11-121-63/+3
| | | | llvm-svn: 167757
* Don't use __cxa_demangle under MSVC (which doesn't have it)Alexander Potapenko2012-11-121-1/+5
| | | | llvm-svn: 167730
* [ASan] Add llvm-symbolizer from to tools/Alexander Potapenko2012-11-121-0/+379
This is the second and last (2/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it with both cmake and configure+make. llvm-svn: 167723
OpenPOWER on IntegriCloud