aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-04-20 18:44:09 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-04-20 18:44:09 +0000
commit76c0db73915571cac056bd054e8a59a57ec784f8 (patch)
tree7e82ceb2b7089fcfe11addd2c67e036ce82ec1b0 /libgo
parentcf1f0eb7cc9062e8d41623087f864eadb63ed3ae (diff)
downloadgcc-76c0db73915571cac056bd054e8a59a57ec784f8.zip
gcc-76c0db73915571cac056bd054e8a59a57ec784f8.tar.gz
gcc-76c0db73915571cac056bd054e8a59a57ec784f8.tar.bz2
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
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/debug/dwarf/line.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/debug/dwarf/line.go b/libgo/go/debug/dwarf/line.go
index f9c77cc..52c3b11 100644
--- a/libgo/go/debug/dwarf/line.go
+++ b/libgo/go/debug/dwarf/line.go
@@ -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})
}