Fix pr 17276.
authorDoug Evans <dje@google.com>
Sat, 23 Aug 2014 00:25:59 +0000 (17:25 -0700)
committerDoug Evans <dje@google.com>
Sat, 23 Aug 2014 00:25:59 +0000 (17:25 -0700)
commita05a36a5fc98c816381b25c37e8aa971cc86c28d
tree54a7e7610db8ee71ed7ebbe1fd4a86e36567ccc8
parent9bda4a968f56cb61b832cdbdabf09a84eab140ab
Fix pr 17276.

See the description here:
https://sourceware.org/ml/gdb-patches/2014-08/msg00283.html

This patch keeps track of whether the current line has seen a
non-zero discriminator, and if so coalesces consecutive entries
for the same line (by ignoring all entries after the first).

gdb/ChangeLog:

PR 17276
* dwarf2read.c (dwarf_record_line_p): New function.
(dwarf_decode_lines_1): Ignore subsequent line number entries
for the same line if any entry had a non-zero discriminator.

gdb/testsuite/ChangeLog:

* gdb.dwarf2/dw2-single-line-discriminators.S: New file.
* gdb.dwarf2/dw2-single-line-discriminators.c: New file.
* gdb.dwarf2/dw2-single-line-discriminators.exp: New file.
gdb/ChangeLog
gdb/dwarf2read.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.S [new file with mode: 0644]
gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.c [new file with mode: 0644]
gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp [new file with mode: 0644]