diff options
| author | Alexey Samsonov <samsonov@google.com> | 2012-08-07 11:46:57 +0000 |
|---|---|---|
| committer | Alexey Samsonov <samsonov@google.com> | 2012-08-07 11:46:57 +0000 |
| commit | 947228c4f7f9b6a8f399c9e91b7bf9e8af55eef0 (patch) | |
| tree | 2d1e936e4b18a0f4a697efd13c361dc2b420e23b /llvm/lib/DebugInfo/DWARFContext.cpp | |
| parent | c99d0e9186ed592a722c6711cea1eda4da4aebe5 (diff) | |
| download | bcm5719-llvm-947228c4f7f9b6a8f399c9e91b7bf9e8af55eef0.tar.gz bcm5719-llvm-947228c4f7f9b6a8f399c9e91b7bf9e8af55eef0.zip | |
Fix the representation of debug line table in DebugInfo LLVM library,
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
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFContext.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARFContext.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARFContext.cpp index a4e0d8eae43..797662b083f 100644 --- a/llvm/lib/DebugInfo/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARFContext.cpp @@ -167,9 +167,7 @@ DILineInfo DWARFContext::getLineInfoForAddress(uint64_t address, const DWARFDebugLine::LineTable *lineTable = getLineTableForCompileUnit(cu); if (lineTable) { // Get the index of the row we're looking for in the line table. - uint64_t hiPC = cu->getCompileUnitDIE()->getAttributeValueAsUnsigned( - cu, DW_AT_high_pc, -1ULL); - uint32_t rowIndex = lineTable->lookupAddress(address, hiPC); + uint32_t rowIndex = lineTable->lookupAddress(address); if (rowIndex != -1U) { const DWARFDebugLine::Row &row = lineTable->Rows[rowIndex]; // Take file/line info from the line table. |

