[llvm-commits] [llvm] r139859 - in /llvm/trunk/lib/DebugInfo: DWARFContext.cpp DWARFDebugAranges.cpp DWARFDebugLine.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Sep 15 14:59:13 PDT 2011
Author: d0k
Date: Thu Sep 15 16:59:13 2011
New Revision: 139859
URL: http://llvm.org/viewvc/llvm-project?rev=139859&view=rev
Log:
DWARF: Reset the state after parsing a line table prologue and remove an unnecessary lookup.
Modified:
llvm/trunk/lib/DebugInfo/DWARFContext.cpp
llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp
llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFContext.cpp?rev=139859&r1=139858&r2=139859&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFContext.cpp Thu Sep 15 16:59:13 2011
@@ -141,10 +141,8 @@
}
DILineInfo DWARFContext::getLineInfoForAddress(uint64_t address) {
- // First, get the index for the arange.
- uint32_t arangeIndex = getDebugAranges()->findAddress(address);
- // From there, get the offset of the compile unit.
- uint32_t cuOffset = getDebugAranges()->offsetAtIndex(arangeIndex);
+ // First, get the offset of the compile unit.
+ uint32_t cuOffset = getDebugAranges()->findAddress(address);
// Retrieve the compile unit.
DWARFCompileUnit *cu = getCompileUnitForOffset(cuOffset);
if (!cu)
Modified: llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp?rev=139859&r1=139858&r2=139859&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFDebugAranges.cpp Thu Sep 15 16:59:13 2011
@@ -100,7 +100,7 @@
const uint32_t num_ranges = getNumRanges();
for (uint32_t i = 0; i < num_ranges; ++i) {
const Range &range = Aranges[i];
- OS << format("0x%8.8x: [0x%8.8llx - 0x%8.8llx)", range.Offset,
+ OS << format("0x%8.8x: [0x%8.8llx - 0x%8.8llx)\n", range.Offset,
(uint64_t)range.LoPC, (uint64_t)range.HiPC());
}
}
Modified: llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp?rev=139859&r1=139858&r2=139859&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFDebugLine.cpp Thu Sep 15 16:59:13 2011
@@ -200,6 +200,8 @@
const uint32_t end_offset = debug_line_offset + prologue->TotalLength +
sizeof(prologue->TotalLength);
+ state.reset();
+
while (*offset_ptr < end_offset) {
uint8_t opcode = debug_line_data.getU8(offset_ptr);
More information about the llvm-commits
mailing list