summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [LLVMSymbolize] Don't use LLVMSymbolizer::Options in ModuleInfo. NFC.Alexey Samsonov2015-10-261-16/+16
| | | | | | | | | LLVMSymbolizer::Options is mostly used in LLVMSymbolizer class anyway. Let's keep their usage restricted to that class, especially given that it's worth to move ModuleInfo to a different header, independent from the symbolizer class. llvm-svn: 251363
* Fix build failure on GCC 4.7 (old libstdc++ doesn't have std::map::emplace).Alexey Samsonov2015-10-261-2/+3
| | | | llvm-svn: 251347
* Remove use of std::map<>::emplace which is not supported on some older ↵David Blaikie2015-10-261-1/+1
| | | | | | versions of libstdc++ llvm-svn: 251346
* [LLVMSymbolize] Use symbol table only if function linkage name was requested.Alexey Samsonov2015-10-261-2/+4
| | | | | | | Now it's enough to just specify -functions=short without additionally providing -use-symbol-table=false. llvm-svn: 251339
* Fix build error by fully qualifying llvm::make_unique.Alexey Samsonov2015-10-261-1/+1
| | | | llvm-svn: 251338
* [LLVMSymbolize] Use std::unique_ptr more extensively to clarify ownership.Alexey Samsonov2015-10-261-11/+12
| | | | llvm-svn: 251336
* Move parts of llvm-symbolizer tool into LLVMSymbolize library.Alexey Samsonov2015-10-267-5/+691
| | | | | | | | | | | | 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
* Use numeric_limits instead of LLONG_MAXMatt Arsenault2015-10-211-2/+2
| | | | | | | This is a build fix for configurations where LLONG_MAX is not defined in system headers. llvm-svn: 250946
* [llvm-symbolizer] Make --relative-address work with DWARF contextsReid Kleckner2015-10-091-17/+4
| | | | | | | | | | | | | | | | Summary: Previously the relative address flag only affected PDB debug info. Now both DIContext implementations always expect to be passed virtual addresses. llvm-symbolizer is now responsible for adding ImageBase to module offsets when --relative-offset is passed. Reviewers: zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12883 llvm-svn: 249784
* Use makeArrayRef or None to avoid unnecessarily mentioning the ArrayRef type ↵Craig Topper2015-09-211-2/+2
| | | | | | extra times. NFC llvm-svn: 248140
* [dwarfdump] Do not apply relocations in mach-o files if there is no ↵Frederic Riss2015-08-231-0/+8
| | | | | | | | | | | | | | LoadedObjectInfo. Not only do we not need to do anything to read correct values from the object files, but the current logic actually wrongly applies twice the section base address when there is no LoadedObjectInfo passed to the DWARFContext creation (as the added test shows). Simply do not apply any relocations on the mach-o debug info if there is no load offset to apply. llvm-svn: 245807
* Fix some comment typos.Benjamin Kramer2015-08-081-2/+2
| | | | llvm-svn: 244402
* Convert getSymbolSection to return an ErrorOr.Rafael Espindola2015-08-071-1/+1
| | | | | | | This function can actually fail since the symbol contains an index to the section and that can be invalid. llvm-svn: 244375
* [dwarfdump] Ignore scattered relocations for mach-o.Frederic Riss2015-07-311-3/+9
| | | | | | | | | | | | | | When encountering a scattered relocation, the code would assert trying to access an unexisting section. I couldn't find a way to expose the result of the processing of a scattered reloc, and I'm really unsure what the right thing to do is. This patch just skips them during the processing in DwarfContext and adds a mach-o file to the tests that exposed the asserting behavior. (This is a new failure that is being exposed by Rafael's recent work on the libObject interfaces. I think the wrong behavior has always happened, but now it's asserting) llvm-svn: 243778
* [RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRefLang Hames2015-07-281-4/+7
| | | | | | rather than a string section name. llvm-svn: 243456
* Return ErrorOr from getSymbolAddress.Rafael Espindola2015-07-031-1/+7
| | | | | | | It can fail trying to get the section on ELF and COFF. This makes sure the error is handled. llvm-svn: 241366
* Don't return error_code from a function that doesn't fail.Rafael Espindola2015-06-301-4/+1
| | | | llvm-svn: 241042
* Don't return error_code from a function that doesn't fail.Rafael Espindola2015-06-301-2/+1
| | | | llvm-svn: 241033
* Don't return error_code from function that never fails.Rafael Espindola2015-06-291-2/+1
| | | | llvm-svn: 241021
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-235-7/+7
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Try to fix generation of LLVMExports.cmake under Visual Studio.Dan Liew2015-06-191-1/+1
| | | | | | | | | | If LLVMDebugInfoPDB links against the DIA SDK then the exports file would contain an INTERFACE_LINK_LIBRARIES property that contained an absolute path to ``diaguids.lib`` which used a native windows path (interpreted as escape sequences when LLVMExports.cmake is imported causing ``find_package(LLVM)`` to fail) rather than the correct CMake style path. llvm-svn: 240181
* Make getRelocationSection MachO only.Rafael Espindola2015-06-191-2/+7
| | | | | | | | | | | | | | There are 3 types of relocations on MachO * Scattered * Section based * Symbol based On ELF and COFF relocations are symbol based. We were in the strange situation that we abstracted over two of them. This makes section based relocations MachO only. llvm-svn: 240149
OpenPOWER on IntegriCloud