diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-20 18:44:09 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-20 18:44:09 +0000 |
commit | 71f5894c56df5aca77372fbe034c6a6196f76c72 (patch) | |
tree | 7e82ceb2b7089fcfe11addd2c67e036ce82ec1b0 | |
parent | 2dfc28d95c8caf3fafe21797115f28f2e3199750 (diff) | |
download | gcc-71f5894c56df5aca77372fbe034c6a6196f76c72.tar.gz |
debug/dwarf: Fix address lookups for different types of lines.
This fixes the lookup when, e.g., discriminators force adding
new line arrays.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186633 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libgo/go/debug/dwarf/line.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/debug/dwarf/line.go b/libgo/go/debug/dwarf/line.go index f9c77cc87e4..52c3b114da3 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}) } |