aboutsummaryrefslogtreecommitdiff
path: root/gold/dwarf_reader.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-12-20 18:37:36 +0000
committerIan Lance Taylor <ian@airs.com>2010-12-20 18:37:36 +0000
commit7500420b3e1046dac0d90eae795314ecf4a99429 (patch)
treed1f3d76dc1b3e6d3cb5d5dfc348d45dacde7a637 /gold/dwarf_reader.h
parent66a3cb9c76c69ead27cedd1ad8f265dd9197450f (diff)
downloadgdb-7500420b3e1046dac0d90eae795314ecf4a99429.zip
gdb-7500420b3e1046dac0d90eae795314ecf4a99429.tar.gz
gdb-7500420b3e1046dac0d90eae795314ecf4a99429.tar.bz2
* dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Only keep
second of two consecutive entries with same offset.
Diffstat (limited to 'gold/dwarf_reader.h')
-rw-r--r--gold/dwarf_reader.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gold/dwarf_reader.h b/gold/dwarf_reader.h
index c197833..8fe7898 100644
--- a/gold/dwarf_reader.h
+++ b/gold/dwarf_reader.h
@@ -46,7 +46,10 @@ struct Offset_to_lineno_entry
int header_num; // which file-list to use (i.e. which .o file are we in)
int file_num; // a pointer into files_
int line_num; // the line number in the source file
- // Offsets are unique within a section, so that's a sufficient sort key.
+
+ // When we add entries to the table, we always use the last entry
+ // with a given offset. Given proper DWARF info, this should ensure
+ // that the offset is a sufficient sort key.
bool operator<(const Offset_to_lineno_entry& that) const
{ return this->offset < that.offset; }
};