gdb/testsuite: Add is-stmt support to the DWARF compiler
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 4 Feb 2020 17:50:40 +0000 (17:50 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 10 Mar 2020 22:32:05 +0000 (22:32 +0000)
commitcecf854779049c3f491caf23f80d13eabbb90c86
treeda5bba4a9c3e64b3a66902642494eae996fbcb69
parenta6a1f5e050c3d4444b8074ba9ba02f547b725892
gdb/testsuite: Add is-stmt support to the DWARF compiler

This commit adds the ability to set and toggle the DWARF line table
is-stmt flag.

A DWARF line table can now be created with the attribute
'default_is_stmt' like this:

  lines {version 2 default_is_stmt 0} label {
    ...
  }

If 'default_is_stmt' is not specified then the current default is 1,
which matches the existing behaviour.

Inside the DWARF line table program you can now make use of
{DW_LNS_negate_stmt} to toggle the is-stmt flag, for example this
meaningless program:

  lines {version 2 default_is_stmt 0} label {
    include_dir "some_directory"
    file_name "some_filename" 1

    program {
      {DW_LNS_negate_stmt}
      {DW_LNE_end_sequence}
    }
  }

This new functionality will be used in a later commit.

gdb/testsuite/ChangeLog:

* lib/dwarf.exp (Dwarf::lines) Add support for modifying the
is-stmt flag in the line table.

Change-Id: Ia3f61d523826382dd2333f65b9aae368ad29c4a5
gdb/testsuite/ChangeLog
gdb/testsuite/lib/dwarf.exp