summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-symbolizer
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR20800: correctly calculate the offset of the subq instruction when ↵Alexander Potapenko2014-09-031-1/+11
| | | | | | | | | | generating compact unwind info. This CL replaces the constant DarwinX86AsmBackend.PushInstrSize with a method that lets the backend account for different sizes of "push %reg" instruction sizes. llvm-svn: 217020
* Don't own the buffer in object::Binary.Rafael Espindola2014-08-192-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries (like Archive) and we had to create dummy buffers just to handle that. It is also a bad fit for IRObjectFile where the Module wants to own the buffer too. Keeping this ownership would make supporting IR inside native objects particularly painful. This patch focuses in lib/Object. If something elsewhere used to own an Binary, now it also owns a MemoryBuffer. This patch introduces a few new types. * MemoryBufferRef. This is just a pair of StringRefs for the data and name. This is to MemoryBuffer as StringRef is to std::string. * OwningBinary. A combination of Binary and a MemoryBuffer. This is needed for convenience functions that take a filename and return both the buffer and the Binary using that buffer. The C api now uses OwningBinary to avoid any change in semantics. I will start a new thread to see if we want to change it and how. llvm-svn: 216002
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-3/+3
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* Remove some calls to std::move.Rafael Espindola2014-08-011-1/+1
| | | | | | | | | Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it. Thanks to David Blaikie for the suggestion. llvm-svn: 214516
* Use a reference instead of a pointer.Rafael Espindola2014-07-311-1/+1
| | | | | | This makes using a std::unique_ptr in the caller more convenient. llvm-svn: 214433
* Use std::unique_ptr to make the ownership explicit.Rafael Espindola2014-07-311-6/+6
| | | | llvm-svn: 214377
* Update the MemoryBuffer API to use ErrorOr.Rafael Espindola2014-07-061-3/+4
| | | | llvm-svn: 212405
* Convert a few methods to use ErrorOr.Rafael Espindola2014-06-231-4/+5
| | | | | | | It used to be inconvenient to mix ErrorOr and UniquePtr, but with c++11 they work OK together. llvm-svn: 211532
* Finishing touch for the std::error_code transition.Rafael Espindola2014-06-131-1/+2
| | | | | | | | | | | While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. llvm-svn: 210920
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-132-4/+2
| | | | llvm-svn: 210876
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-122-0/+2
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Use std::error_code instead of llvm::error_code.Rafael Espindola2014-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of this patch is to turn llvm/Support/system_error.h into a transitional header that just brings in the erorr_code api to the llvm namespace. I will remove it shortly afterwards. The cases where the general idea needed some tweaking: * std::errc is a namespace in msvc, so we cannot use "using std::errc". I could add an #ifdef, but there were not that many uses, so I just added std:: to them in this patch. * Template specialization had to be moved to the std namespace in this patch set already. * The msvc implementation of default_error_condition doesn't seem to provide the same transformations as we need. Not too surprising since the standard doesn't actually say what "equivalent" means. I fixed the problem by keeping our old mapping and using it at error_code construction time. Despite these shortcomings I think this is still a good thing. Some reasons: * The different implementations of system_error might improve over time. * It removes 925 lines of code from llvm already. * It removes 6313 bytes from the text segment of the clang binary when it is built with gcc and 2816 bytes when building with clang and libstdc++. llvm-svn: 210687
* [DWARF parser] Teach DIContext to fetch short (non-linkage) function names ↵Alexey Samsonov2014-05-173-13/+18
| | | | | | | | | | 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
* [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.Alexey Samsonov2014-05-151-9/+8
| | | | | | | | | | | | It is more appropriate than the current situation, when one flag (AbsoluteFilePath) is relevant only if another flag is set. This refactoring would also simplify fetching the short function name (stored in DW_AT_name) instead of a linkage name returned currently. No functionality change. llvm-svn: 208921
* [C++] Use 'nullptr'. Tools edition.Craig Topper2014-04-252-14/+14
| | | | llvm-svn: 207176
* Use unique_ptr to manage ParsedBinariesAndObjects in LLVMSymbolizerDavid Blaikie2014-04-222-8/+8
| | | | llvm-svn: 206866
* [DWARF parser] Turn DILineInfo into a struct.Alexey Samsonov2014-04-181-13/+5
| | | | | | | | | | Immutable DILineInfo doesn't bring any benefits and complicates code. Also, use std::string instead of SmallString<16> for file and function names - their length can vary significantly. No functionality change. llvm-svn: 206654
* [C++11] Introduce ObjectFile::symbols() to use range-based loops.Alexey Samsonov2014-03-172-12/+10
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3081 llvm-svn: 204031
* [C++11] Use ObjectFile::sections() in commandline llvm toolsAlexey Samsonov2014-03-131-4/+3
| | | | llvm-svn: 203802
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-062-5/+4
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-2/+2
| | | | llvm-svn: 202957
* llvm-symbolizer: use dynamic symbol table if the regular one is stripped.Alexey Samsonov2014-02-262-29/+44
| | | | llvm-svn: 202265
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-101-2/+2
| | | | llvm-svn: 201108
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-301-6/+2
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* llvm-symbolizer: make mangled name heuristic apply to all symbolsEd Maste2014-01-162-8/+5
| | | | | | PR: http://llvm.org/pr18431 Review: http://llvm-reviews.chandlerc.com/D2552 llvm-svn: 199404
* Return an ErrorOr<Binary *> from createBinary.Rafael Espindola2014-01-151-9/+12
| | | | | | | | I did write a version returning ErrorOr<OwningPtr<Binary> >, but it is too cumbersome to use without std::move. I will keep the patch locally and submit when we switch to c++11. llvm-svn: 199326
* Check the error code and save a call to sys::fs::exists.Rafael Espindola2014-01-151-4/+2
| | | | llvm-svn: 199293
* Re-sort #include lines again, prior to moving headers around.Chandler Carruth2014-01-131-1/+0
| | | | llvm-svn: 199080
* llvm-symbolizer: add --obj flag to specify a single object file that should ↵Alexey Samsonov2013-12-241-17/+24
| | | | | | be symbolized. llvm-svn: 197988
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-0/+1
| | | | llvm-svn: 196908
* llvm-symbolizer: don't always run demangler on global object namesAlexey Samsonov2013-10-162-1/+8
| | | | llvm-svn: 192781
* llvm-symbolizer: use real path when looking for debug binary locationAlexey Samsonov2013-08-261-2/+11
| | | | llvm-svn: 189250
* llvm-symbolizer: add support for .gnu_debuglink sectionAlexey Samsonov2013-08-141-0/+83
| | | | llvm-svn: 188386
* LLVMSymbolize.cpp: Fix build. Triple::ArchType is not a namespace.NAKAMURA Takumi2013-07-171-1/+1
| | | | llvm-svn: 186494
* llvm-symbolizer: be more careful with colons in file namesAlexey Samsonov2013-07-171-8/+7
| | | | llvm-svn: 186493
* llvm-symbolizer: Recognize a drive letter on win32. Then "REQUIRES: shell" ↵NAKAMURA Takumi2013-07-011-0/+5
| | | | | | | can be removed. FIXME: Could we use llvm::sys::Path here? llvm-svn: 185322
* llvm-symbolizer: don't leave dangling pointers after flushing ↵Alexey Samsonov2013-06-282-0/+5
| | | | | | LLVMSymbolizer. Add a destructor. llvm-svn: 185154
* llvm-symbolizer: skip leading underscore in Mach-O symbol table entriesAlexey Samsonov2013-06-281-0/+3
| | | | llvm-svn: 185151
* llvm-symbolizer: make name demangling a public static method of LLVMSymbolizerAlexey Samsonov2013-06-282-9/+11
| | | | llvm-svn: 185143
* llvm-symbolizer: add support for Mach-O universal binariesAlexey Samsonov2013-06-283-42/+101
| | | | llvm-svn: 185137
* [llvm-symbolizer] rewrite r183213 in a more clear wayAlexey Samsonov2013-06-072-7/+10
| | | | llvm-svn: 183526
* [llvm-symbolizer] Avoid calling slow getSymbolSize for Mach-O files. Assume ↵Alexey Samsonov2013-06-042-9/+20
| | | | | | that symbols with zero size are in fact large enough. llvm-svn: 183213
* Correct handling invalid filename in llvm-symbolizerAlexey Samsonov2013-06-031-2/+2
| | | | llvm-svn: 183102
* At Jim Grosbach's request detemplate Object/MachO.h.Rafael Espindola2013-04-181-1/+1
| | | | | | | We are still able to handle mixed endian objects by swapping one struct at a time. llvm-svn: 179778
* Convert MachOObjectFile to a template.Rafael Espindola2013-04-091-1/+1
| | | | | | | For now it is templated only on being 64 or 32 bits. I will add little/big endian next. llvm-svn: 179097
* llvm-symbolizer: correctly parse filenames given in quotesAlexey Samsonov2013-04-051-5/+18
| | | | llvm-svn: 178859
* Fix for r177390: map values are pointers, use DeleteContainerSeconds() ↵Alexey Samsonov2013-03-191-1/+2
| | | | | | instead of .clear() llvm-svn: 177409
* llvm-symbolizer: flush internal caches functionalityDmitry Vyukov2013-03-192-0/+5
| | | | llvm-svn: 177390
* clang-formatize llvm-symbolizer codeAlexey Samsonov2013-02-153-78/+69
| | | | llvm-svn: 175255
* llvm-symbolizer: speedup symbol lookupDmitry Vyukov2013-02-142-43/+73
| | | | llvm-svn: 175158
OpenPOWER on IntegriCloud