Commit 76c0db73 by Ian Lance Taylor

debug/dwarf: Fix address lookups for different types of lines.

This fixes the lookup when, e.g., discriminators force adding
new line arrays.

From-SVN: r186633
parent cf1f0eb7
......@@ -415,6 +415,10 @@ func (d *Data) addLine(lines []mapLineInfo, lineInfo Line, address uint64, line
if newLineInfo {
if len(lines) > 0 {
sort.Sort(lines[len(lines)-1].addrs)
p := &lines[len(lines)-1]
if len(p.addrs) > 0 && address > p.addrs[len(p.addrs)-1].pc {
p.addrs = append(p.addrs, oneLineInfo{address, p.addrs[len(p.addrs)-1].line})
}
}
lines = append(lines, mapLineInfo{line: lineInfo})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment