]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Add gdb.dwarf2/imported-unit-c.exp
authorTom de Vries <tdevries@suse.de>
Tue, 22 Jun 2021 13:58:09 +0000 (15:58 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 22 Jun 2021 13:58:09 +0000 (15:58 +0200)
commite5b771060e42232b6d70e9fce0e6907bc979ef21
treecf04e6e2dd5af04a2c498bbf5414f5a743d2ea9e
parent50331d64f1080c2c9957fb608e0af236b96c1a41
[gdb/testsuite] Add gdb.dwarf2/imported-unit-c.exp

This test-case is intended to excercise this code in process_imported_unit_die:
...
      /* We're importing a C++ compilation unit with tag DW_TAG_compile_unit
 into another compilation unit, at root level.  Regard this as a hint,
 and ignore it.  */
      if (die->parent && die->parent->parent == NULL
  && per_cu->unit_type == DW_UT_compile
  && per_cu->lang == language_cplus)
return;
...
in the sense that the test-case should fail if the
"per_cu->lang == language_cplus" clause is removed.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2021-06-22  Tom de Vries  <tdevries@suse.de>

* gdb.dwarf2/imported-unit-c.exp: New file.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/imported-unit-c.exp [new file with mode: 0644]