binutils-gdb/gdb/testsuite/gdb.ctf
Tom de Vries 908a926ec4 [gdb/testsuite] Fix ctf test-cases on openSUSE Tumbleweed
When running test-case gdb.base/ctf-constvars.exp on openSUSE Tumbleweed (with
system gcc version 12, providing gcc -gctf support, enabling the ctf test-cases
in the gdb testsuite), I run into:
...
(gdb) print vox^M
'vox' has unknown type; cast it to its declared type^M
(gdb) FAIL: gdb.base/ctf-constvars.exp: print vox
...

There are two causes for this:
- the linker flags are missing --ctf-variables, so the information for variable
  vox is missing (reported in PR29468), and
- the executable contains some dwarf2 due to some linked-in glibc objects,
  so the ctf info is ignored (reported in PR29160).

By using:
- -Wl,--ctf-variable,
- -Wl,--strip-debug, and
we can make the test-case and some similar test-cases pass.

Tested on x86_64-linux.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29160
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29468
2022-10-12 17:02:15 +02:00
..
cross-tu-cyclic-1.c
cross-tu-cyclic-2.c
cross-tu-cyclic-3.c
cross-tu-cyclic-4.c
cross-tu-cyclic.exp [gdb/testsuite] Fix ctf test-cases on openSUSE Tumbleweed 2022-10-12 17:02:15 +02:00
ctf-a.c
ctf-a.h
ctf-b.c
ctf-b.h
ctf-c.c
ctf-c.h
funcreturn.exp [gdb/testsuite] Fix ctf test-cases on openSUSE Tumbleweed 2022-10-12 17:02:15 +02:00
multi.exp [gdb/testsuite] Fix ctf test-cases on openSUSE Tumbleweed 2022-10-12 17:02:15 +02:00
whatis.c