]> gcc.gnu.org Git - gcc.git/commitdiff
debug/dwarf: Fix address lookups for different types of lines.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 20 Apr 2012 18:44:09 +0000 (18:44 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 20 Apr 2012 18:44:09 +0000 (18:44 +0000)
This fixes the lookup when, e.g., discriminators force adding
new line arrays.

From-SVN: r186633

libgo/go/debug/dwarf/line.go

index f9c77cc87e46e67772f5e17e174e83fde58e3dd9..52c3b114da33a2ecb4e4b58c15353ca2376bb61b 100644 (file)
@@ -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})
        }
This page took 0.062171 seconds and 5 git commands to generate.