+const DWARFDebugLine::LineTable *
+DWARFDebugLine::getOrParseLineTable(DataExtractor debug_line_data,
+ uint32_t offset) {
+ LineTableIter pos = LineTableMap.find(offset);
+ if (pos == LineTableMap.end()) {
+ // Parse and cache the line table for at this offset.
+ State state;
+ if (!parseStatementTable(debug_line_data, &offset, state))
+ return 0;
+ // FIXME: double lookup.
+ LineTableMap[offset] = state;
+ return &LineTableMap[offset];
+ }
+ return &pos->second;
+}
+