summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfo] Eliminate compilation warning about used variable LSDADmitry Polukhin2016-02-051-2/+1
| | | | | | | The waring was: lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:643:20: warning: variable ‘LSDA’ set but not used llvm-svn: 259877
* [DebugInfo] Support zero-length CIE in the _eh_frame parserIgor Laevsky2016-01-271-30/+27
| | | | | | | | | | | | MCJIT emits zero-length CIE at the end of the _eh_frame section. This change ensures that parser inside DebugInfo will not crash and correctly record such cases. We are now recording DW_EH_PE_omit as a default value for FDE and LSDA encodings. Also Offset != EndAugmentationOffset assertion check will only happen if augmentation string had 'z' letter in it. Differential Revision: http://reviews.llvm.org/D16588 llvm-svn: 258931
* Remove autoconf supportChris Bieneman2016-01-265-72/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Re-submit r256008 "Improve DWARFDebugFrame::parse to also handle __eh_frame."Igor Laevsky2016-01-263-19/+186
| | | | | | | Originally this change was causing failures on windows buildbots. But those problems were fixed in r258806. llvm-svn: 258811
* [DebugInfo] Fix DWARFDebugFrame instruction operand orderingIgor Laevsky2016-01-261-6/+14
| | | | | | | | We can't rely on the evalution order of function arguments. Differential Revision: http://reviews.llvm.org/D16509 llvm-svn: 258806
* Fix instance of -Wcovered-switch-defaultReid Kleckner2016-01-131-2/+0
| | | | llvm-svn: 257665
* [readobj] Expand CodeView dumping functionalityReid Kleckner2016-01-131-26/+24
| | | | | | | | | | | | | | | | This rewrites and expands the existing codeview dumping functionality in llvm-readobj using techniques similar to those in lib/Object. This defines a number of new records and enums useful for reading memory mapped codeview sections in COFF objects. The dumper is intended as a testing tool for LLVM as it grows more codeview output capabilities. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D16104 llvm-svn: 257658
* fixing type.Mike Aizatsky2016-01-091-1/+2
| | | | llvm-svn: 257238
* llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp: Fix build in -m32. 1L is ↵NAKAMURA Takumi2016-01-091-1/+1
| | | | | | incompatible to int64_t. llvm-svn: 257237
* [llvm-symbolizer] -print-source-context-lines option to print source code ↵Mike Aizatsky2016-01-091-4/+35
| | | | | | | | around the line. Differential Revision: http://reviews.llvm.org/D15909 llvm-svn: 257236
* Fix several accidental DOS line endings in source filesDimitry Andric2016-01-032-117/+117
| | | | | | | | | | | | | | | Summary: There are a number of files in the tree which have been accidentally checked in with DOS line endings. Convert these to native line endings. There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those. Reviewers: joerg, aaron.ballman Subscribers: aaron.ballman, sanjoy, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D15848 llvm-svn: 256707
* Remove unused constants from TypeTableBuilder.cpp.Dave Bartolomeo2015-12-241-4/+0
| | | | llvm-svn: 256389
* Fix case of path nameBill Seurer2015-12-241-1/+1
| | | | llvm-svn: 256388
* Fix CodeView library name and non-CMake buildsDave Bartolomeo2015-12-243-4/+21
| | | | llvm-svn: 256387
* LLVM CodeView libraryDave Bartolomeo2015-12-2412-2/+670
| | | | | | | | | | | | | | | | | | Summary: This diff is the initial implementation of the LLVM CodeView library. There is much more work to be done, namely a CodeView dumper and tests. This patch should help others make progress on the LLVM->CodeView debug info emission while I continue with the implementation of the dumper and tests. This library implements support for emitting debug info in the CodeView format. This phase of the implementation only includes support for CodeView type records. Clients that need to emit type records will use a class derived from TypeTableBuilder. TypeTableBuilder provides member functions for writing each kind of type record; each of these functions eventually calls the writeRecord virtual function to emit the actual bits of the record. Derived classes override writeRecord to implement the folding of duplicate records and the actual emission to the appropriate destination. LLVMCodeView provides MemoryTypeTableBuilder, which creates the table in memory. In the future, other classes derived from TypeTableBuilder will write to other destinations, such as the type stream in a PDB. The rest of the types in LLVMCodeView define the actual CodeView type records and all of the supporting enums and other types used in the type records. The TypeIndex class is of particular interest, because it is used by clients as a handle to a type in the type table. The library provides a relatively low-level interface based on the actual on-disk format of CodeView. For example, type records refer to other type records by TypeIndex, rather than by an actual pointer to the referent record. This allows clients to emit type records one at a time, rather than having to keep the entire transitive closure of type records in memory until everything has been emitted. At some point, having a higher-level interface layered on top of this one may be useful for debuggers and other tools that want a more holistic view of the debug info. The lower-level interface should be sufficient for compilers and linkers to do the debug info manipulation that they need to do efficiently. Reviewers: rnk, majnemer Subscribers: silvas, rnk, jevinskie, llvm-commits Differential Revision: http://reviews.llvm.org/D14961 llvm-svn: 256385
* [Symbolize] Improve the ownership of parsed objects.Alexey Samsonov2015-12-181-46/+45
| | | | | | | | | | | | | | | | | | This code changes the way Symbolize handles parsed binaries: now parsed OwningBinary<Binary> is not broken into (binary, memory buffer) pair, and is just stored as-is in a cache. ObjectFile components of Mach-O universal binaries are also stored explicitly in a separate cache. Additionally, this change: * simplifies the code that parses/caches binaries: it's now done in a single place, not three different functions. * makes flush() method behave as expected, and actually clear the cached parsed binaries and objects. * fixes a dangling pointer issue described in http://reviews.llvm.org/D15638 llvm-svn: 256041
* Revert "Improve DWARFDebugFrame::parse to also handle __eh_frame."Pete Cooper2015-12-183-186/+19
| | | | | | | | This reverts commit r256008. Its breaking multiple buildbots, although works for me locally. llvm-svn: 256013
* Improve DWARFDebugFrame::parse to also handle __eh_frame.Pete Cooper2015-12-183-19/+186
| | | | | | | | | | | | | | | LLVM MC has single methods which can handle the output of EH frame and DWARF CIE's and FDE's. This code improves DWARFDebugFrame::parse to do the same for parsing. This also allows llvm-objdump to support the --dwarf=frames option which objdump supports. This option dumps the .eh_frame section using the new code in DWARFDebugFrame::parse. http://reviews.llvm.org/D15535 Reviewed by Rafael Espindola. llvm-svn: 256008
* Test commitDave Bartolomeo2015-12-171-1/+1
| | | | llvm-svn: 255926
* [llvm-dwp] Retrieve the DWOID from the CU for the cu_index entryDavid Blaikie2015-12-041-2/+8
| | | | llvm-svn: 254731
* dwarfdump: Correctly indentify the indicies for DWP recordsDavid Blaikie2015-12-031-1/+1
| | | | | | The indicies are one-based, not zero-based, per the spec. llvm-svn: 254626
* [llvm-dwp] Don't rely on implicit move assignment operator (MSVC won't ↵David Blaikie2015-12-021-2/+7
| | | | | | synthesize one) llvm-svn: 254492
* [llvm-dwp] Emit a rather fictional debug_cu_indexDavid Blaikie2015-12-022-13/+15
| | | | | | | | | | | | | | This is very rudimentary support for debug_cu_index, but it is enough to allow llvm-dwarfdump to find the offsets for contributions and correctly dump debug_info. It will need to actually find the real signature of the unit and build the real hash table with the right number of buckets, as per the DWP specification. It will also need to be expanded to cover the tu_index as well. llvm-svn: 254489
* Replace dyn_cast with isa in places that weren't using the returned value ↵Craig Topper2015-11-181-1/+1
| | | | | | for more than a boolean check. NFC. llvm-svn: 253441
* Fix null dereference committed in r253277David Blaikie2015-11-171-2/+3
| | | | llvm-svn: 253393
* dwarfdump: support indexed string dumping in dwp based on the STR_OFFSETS ↵David Blaikie2015-11-171-1/+5
| | | | | | component of the index llvm-svn: 253392
* dwarfdump: Reference the appropriate line table segment when dumping dwp filesDavid Blaikie2015-11-172-6/+10
| | | | | | Also improves .dwo type unit dumping which didn't handle this either. llvm-svn: 253377
* Fix indentationDavid Blaikie2015-11-171-1/+1
| | | | llvm-svn: 253278
* dwarfdump: Use the index to find the right abbrev offset in DWP filesDavid Blaikie2015-11-173-19/+93
| | | | llvm-svn: 253277
* dwarfdump: Add support for dumping the table contents of DWP indexesDavid Blaikie2015-11-131-5/+59
| | | | | | | | | | | | | This is a recommit of 252842 which was reverted in 252859. The issue was using %s format specifier for a StringRef - used Format's left_justify(StringRef, int) instead. It'd be nice to have __attribute__((format(..))) on llvm::format, but apparently it's only implemented for c-style variadics, not C++ variadic templates. Perhaps we could fix that & conditionalize the attribute on such... llvm-svn: 253065
* [Symbolizer] Don't use PE symbol tables to override PDB symbolsReid Kleckner2015-11-132-2/+16
| | | | | | | | | | | | | | | | | | | | | Summary: PE files are stripped by default, and only contain the names of exported symbols. The actual reason that we bother to do this override by default is actually due to a quirk of the way -gline-tables-only is implemented, so I phrased the check as "if we are symbolizing from dwarf, do the symtab override". This fixes lots of Windows ASan tests that I broke in r250582. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14594 llvm-svn: 253051
* dwarfdump: Added macro support to llvm-dwarfdump tool.Amjad Aboud2015-11-125-1/+122
| | | | | | | | Added "macro" option to "-debug-dump" flag, which trigger parsing and dumping of the ".debug_macinfo" section. Differential Revision: http://reviews.llvm.org/D14294 llvm-svn: 252866
* Mostly revert 252842 due to failures on some buildbots.David Blaikie2015-11-121-59/+5
| | | | | | | | | | | | | | I imagine there's some UB in here somewhere, though Valgrind doesn't seem to have picked it up (not sure if I have a working asan build right now to test there). GDB bot seems to be crashing: http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/26267/steps/check-all/logs/FAIL%3A%20LLVM%3A%3Adwarfdump-dwp.test Hexagon ELF bot is, presumably, just getting different output: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/32927/steps/check-all/logs/FAIL%3A%20LLVM%3A%3Adwarfdump-dwp.test llvm-svn: 252859
* dwarfdump: Add error checking to fix the buildbots/correctnessDavid Blaikie2015-11-121-4/+4
| | | | llvm-svn: 252845
* dwarfdump: Add some error handling for DWP index sections of the wrong sizeDavid Blaikie2015-11-121-0/+7
| | | | llvm-svn: 252843
* dwarfdump: Dump the contents of DWP indexesDavid Blaikie2015-11-121-5/+82
| | | | llvm-svn: 252842
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-111-6/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252798
* dwarfdump: DWP type unit index dumping skeletonDavid Blaikie2015-11-111-0/+10
| | | | llvm-svn: 252786
* Format my previous commitDavid Blaikie2015-11-112-6/+5
| | | | llvm-svn: 252782
* dwarfdump: First piece of support for DWP dumpingDavid Blaikie2015-11-113-0/+52
| | | | | | Just a tiny piece of index dumping - the header in this instance. llvm-svn: 252781
* Reverting r252760Colin LeMahieu2015-11-111-14/+6
| | | | llvm-svn: 252770
* [Symbolizer]: Add -pretty-print optionHemant Kulkarni2015-11-111-6/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D13671 llvm-svn: 252760
* [LLVMSymbolize] Reduce indentation by using helper function. NFC.Alexey Samsonov2015-11-041-21/+24
| | | | llvm-svn: 252022
* [LLVMSymbolize] Properly propagate object parsing errors from the library.Alexey Samsonov2015-11-041-90/+107
| | | | llvm-svn: 252021
* [LLVMSymbolize] Factor out the logic for printing structs from DIContext. NFC.Alexey Samsonov2015-11-033-61/+76
| | | | | | | | 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
* [LLVMSymbolize] Move demangling away from printing routines. NFC.Alexey Samsonov2015-11-031-28/+33
| | | | | | | | | Make printDILineInfo and friends responsible for just rendering the contents of the structures, demangling should actually be performed earlier, when we have the information about the originating SymbolizableModule at hand. llvm-svn: 251981
* Let the users of LLVMSymbolizer decide whether they want to symbolize ↵Alexey Samsonov2015-10-301-12/+30
| | | | | | | | | | | 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
* [LLVMSymbolize] Simplify SymbolizableObjectFile::symbolizeInlinedCode(). NFC.Alexey Samsonov2015-10-301-17/+9
| | | | llvm-svn: 251672
* [LLVMSymbolize] Move printing the description of a global into a separate ↵Alexey Samsonov2015-10-293-19/+28
| | | | | | function. NFC. llvm-svn: 251669
* [LLVMSymbolize] Move ModuleInfo into a separate class (SymbolizableModule).Alexey Samsonov2015-10-294-218/+353
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is mostly NFC. It is a first step in cleaning up LLVMSymbolize library. It removes "ModuleInfo" class which bundles together ObjectFile and its debug info context in favor of: * abstract SymbolizableModule in public headers; * SymbolizableObjectFile subclass in implementation. Additionally, SymbolizableObjectFile is now created via factory, so we can properly detect object parsing error at this stage instead of keeping the broken half-parsed object. As a next step, we would be able to propagate the error all the way back to the library user. Further improvements might include: * factoring out the logic of finding appropriate file with debug info for a given object file, and caching all parsed object files into a separate class [A]. * factoring out DILineInfo rendering [B]. This would make what is now a heavyweight "LLVMSymbolizer" a relatively straightforward class, that calls into [A] to turn filepath into a SymbolizableModule, delegates actual symbolization to concrete SymbolizableModule implementation, and lets [C] render the result. Reviewers: dblaikie, echristo, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14099 llvm-svn: 251662
OpenPOWER on IntegriCloud