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
This commit is contained in:
parent
cf1f0eb7cc
commit
76c0db7391
1 changed files with 4 additions and 0 deletions
|
@ -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})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue