]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Allow DWARF assembler to create multiple line tables
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 6 Dec 2019 21:35:18 +0000 (21:35 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 13 Jan 2020 23:56:02 +0000 (23:56 +0000)
Fixes a bug in the DWARF assembler that prevents multiple line tables
from being created in a test.  We currently don't initialise a couple
of flags, as a result we will only ever generate one end of file list,
and one end of header, in the first line table.  Any additional line
tables will be missing these parts, and will therefore be corrupt.

This fix will be required for a later commit.  There should be no
change in the testsuite after this commit.

gdb/testsuite/ChangeLog:

* lib/dwarf.exp (Dwarf::lines): Reset _line_saw_program and
_line_saw_file.

Change-Id: Id7123f217a036f26ee32d608db3064dd43164596

gdb/testsuite/ChangeLog
gdb/testsuite/lib/dwarf.exp

index 10d7cbec0743ed1781237dc9e24754297e2677c4..4209c5757c30e85882c44d945b89a6e518a7a71e 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-13  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * lib/dwarf.exp (Dwarf::lines): Reset _line_saw_program and
+       _line_saw_file.
+
 2020-01-13  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * lib/tuiterm.exp (Term::_check_box): Check some parts of the top
index da9763e00eb86debfedf3842fc8e65d93b23a7bf..6c6ffbe7c2fb2df6789b3534561cdb177b7905b5 100644 (file)
@@ -1309,6 +1309,8 @@ namespace eval Dwarf {
        set is_64 0
        set _unit_version 4
        set _unit_addr_size default
+       set _line_saw_program 0
+       set _line_saw_file 0
 
        foreach { name value } $options {
            switch -exact -- $name {