summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFDebugLine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move DebugInfo to DebugInfo/DWARF.Zachary Turner2015-01-301-698/+0
| | | | | | | | | | | | | In preparation for adding PDB support to LLVM, this moves the DWARF parsing code to its own subdirectory under DebugInfo, and renames LLVMDebugInfo to LLVMDebugInfoDWARF. This is purely a mechanical / build system change. Differential Revision: http://reviews.llvm.org/D7269 Reviewed by: Eric Christopher llvm-svn: 227586
* [DebugInfo] Move all DWARF headers to the public include directory.Frederic Riss2014-12-191-1/+1
| | | | | | | | | | dsymutil needs access to DWARF specific inforamtion, the small DIContext wrapper isn't sufficient. Other DWARF consumers might want to use it too (I'm looking at you lldb). Differential Revision: http://reviews.llvm.org/D6694 llvm-svn: 224594
* Turn local DWARFContext helpers getFileNameForUnit() and ↵Frederic Riss2014-09-191-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getFileLineInfoForCompileUnit() into full-blowm DWARFDebugLine::LineTable methods. Summary: getFileNameForUnit() is basically a wrapper around LineTable::getFileNameByIndex(). Fold its additional functionality (adding the DWARFUnit compilation dir) into LineTable::getFileNameByIndex(). getFileLineInfoForCompileUnit() is a wrapper around getFileNameForUnit(). As a function to search the line information by address, it seems natural to put it in the LineTable also. Before this commit only the Context with its private helpers could do Linetable lookups. This newly exposed feature will be used by the DIE dumping code to get access to file information referenced in DIE attributes. This commit has already been partly reviewed in D5192 and contained an additional and a bit controversial 'realpath' call that is left out of this patch. We can reinstate that realpath code later if it is desirable. Test Plan: The patch contains no tests as it should be functionally equivalent to the previous code. As requested in the last review, I checked if the relative path handling copied from the Context to LineTable::getFileNameByIndex() was covered, and indeed the symbolizer tests fail if it is removed. Reviewers: dblaikie, echristo, aprantl, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5354 llvm-svn: 218125
* [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.Alexey Samsonov2014-05-151-3/+5
| | | | | | | | | | | | 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
* [DWARF parser] Cleanup code in DWARFDebugLine.Alexey Samsonov2014-04-301-88/+85
| | | | | | | | | | | | | | | | | | Streamline parsing and dumping line tables: Prefer composition to multiple inheritance in DWARFDebugLine::ParsingState. Get rid of the weird concept of "DumpingState" structure. was: DWARFDebugLine::DumpingState state(OS); DWARFDebugLine::parseStatementTable(..., state); now: DWARFDebugLine::LineTable LineTable; LineTable.parse(...); LineTable.dump(OS); No functionality change. llvm-svn: 207599
* [DWARF parser] Cleanup code in DWARFDebugLine.Alexey Samsonov2014-04-291-65/+100
| | | | | | | | | | | | | Move several function definitions into .cpp, unify constructors and clear() methods (fixing a couple of latent bugs from copy-paste), turn static function parsePrologue() into Prologue::parse(). More work needed here to untangle weird multiple inheritance in table parsing and dumping. No functionality change. llvm-svn: 207579
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-151-2/+2
| | | | | | instead of comparing to nullptr. llvm-svn: 206252
* [C++11] Convert DWARF parser to range-based for loopsAlexey Samsonov2014-03-131-3/+3
| | | | llvm-svn: 203766
* llvm-dwarfdump: Support for debug_line.dwo section for file names for type ↵David Blaikie2014-02-241-13/+15
| | | | | | units under fission. llvm-svn: 202091
* Support DWARF discriminators in object streamer.Diego Novillo2014-02-141-3/+9
| | | | | | | | | | | | | | | Summary: This adds support for emitting DWARF path discriminator values in the object streamer. It also changes the DWARF dumper to show discriminator values in the line table output. Reviewers: echristo CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2794 llvm-svn: 201427
* Correct log message typo: ended ad -> ended atEd Maste2013-10-181-1/+1
| | | | | | (From LLDB r192897) llvm-svn: 192968
* DWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?NAKAMURA Takumi2013-01-261-0/+2
| | | | llvm-svn: 173552
* Add DIContext::getLineInfoForAddressRange() function and test. This ↵Andrew Kaylor2013-01-261-0/+75
| | | | | | function allows a caller to obtain a table of line information for a function using the function's address and size. llvm-svn: 173537
* Add support for applying in-memory relocations to the .debug_line section ↵Andrew Kaylor2013-01-251-3/+12
| | | | | | and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes. llvm-svn: 173517
* Refactor fetching file/line info from DWARFContext to simplify theAlexey Samsonov2012-08-301-0/+27
| | | | | | | | code and allow better code reuse. Make the code a bit more conforming to LLVM code style. No functionality change. llvm-svn: 162895
* Fix the representation of debug line table in DebugInfo LLVM library,Alexey Samsonov2012-08-071-39/+78
| | | | | | | | | | | | | and "instruction address -> file/line" lookup. Instead of plain collection of rows, debug line table for compilation unit is now treated as the number of row ranges, describing sequences (series of contiguous machine instructions). The sequences are not always listed in the order of increasing address, so previously used std::lower_bound() sometimes produced wrong results. Now the instruction address lookup consists of two stages: finding the correct sequence, and searching for address in range of rows for this sequence. llvm-svn: 161414
* Audited all the format strings in libDebugInfo and fixed those that didn't ↵Benjamin Kramer2011-11-051-2/+3
| | | | | | match the types. llvm-svn: 143814
* Add more PRI.64 macros for MSVC and use them throughout the codebase.Benjamin Kramer2011-11-051-1/+1
| | | | llvm-svn: 143799
* lib/DebugInfo/DWARFDebugLine.cpp: De-Unicode-ify.NAKAMURA Takumi2011-10-081-2/+2
| | | | llvm-svn: 141484
* WhitespaceNAKAMURA Takumi2011-10-081-1/+1
| | | | llvm-svn: 141483
* DWARF: avoid unnecessary map lookups.Benjamin Kramer2011-09-211-6/+5
| | | | llvm-svn: 140260
* DWARF: Reset the state after parsing a line table prologue and remove an ↵Benjamin Kramer2011-09-151-0/+2
| | | | | | unnecessary lookup. llvm-svn: 139859
* DWARF: Put all the pieces we have together and provide a single accessor to ↵Benjamin Kramer2011-09-151-1/+3
| | | | | | DIContext that provides line information when given an address. llvm-svn: 139836
* DWARF: Remove accessors that parse the whole line table section in one go, ↵Benjamin Kramer2011-09-151-38/+14
| | | | | | | | this can't possibly work. The address size is specified by the compile unit associated with a line table, there is no global address size. llvm-svn: 139835
* Give structs with virtual methods a virtual destructor.Nick Lewycky2011-09-151-0/+4
| | | | llvm-svn: 139776
* DWARF: Silence GCC -Wsign-compare warning.Benjamin Kramer2011-09-151-1/+1
| | | | llvm-svn: 139775
* DWARF: Include <algorithm> explicitly.Benjamin Kramer2011-09-151-0/+1
| | | | llvm-svn: 139773
* DWARF: Add basic support for line tables.Benjamin Kramer2011-09-151-0/+491
The llvm-dwarfdump output isn't very verbose yet. llvm-svn: 139771
OpenPOWER on IntegriCloud