[gdb/testsuite] Require address update for DW_LNS_copy
commit4f24b90aba691182e5093a6450e30fcb7d5dd803
authorTom de Vries <tdevries@suse.de>
Wed, 17 Apr 2024 10:55:00 +0000 (17 12:55 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 17 Apr 2024 10:55:00 +0000 (17 12:55 +0200)
tree049e3af0f2934f60db3f1b1bbed3adbbb388c74f
parentd52ba54add0d2500403db63c09878e3f3cde8449
[gdb/testsuite] Require address update for DW_LNS_copy

No address update before a DW_LNS_copy might mean an incorrect dwarf
assembly test-case.

Try to catch such incorrect dwarf assembly test-cases by:
- requiring an explicit address update for each DW_LNS_copy, and
- handling the cases where an update is indeed not needed, by adding
  "DW_LNS_advance_pc 0".

Tested on aarch64-linux.
gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
gdb/testsuite/lib/dwarf.exp