]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add guality [p]type test.
authorMark Wielaard <mjw@redhat.com>
Tue, 19 Aug 2014 10:30:07 +0000 (10:30 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Tue, 19 Aug 2014 10:30:07 +0000 (10:30 +0000)
commita6dad7b65850d7b4ea83f7a8e17d74e7aeefcdd5
tree3fd8d69776cc4f02da123057b50399697da12933
parent4f9b1c116e1ec9ffaa8f951e54d08621e2fc5d98
Add guality [p]type test.

Add a new type:var variant to the guality.exp testsuite to check that
gdb gets the correct type for a variable or function. To use it in a
guality test add something like:

/* { dg-final { gdb-test 50 "type:main" "int (int, char **)" } } */

Which will put a breakpoint at line 50 and check that the type of "main"
equals "int (int, char **)" according to gdb. The test harness will make
sure to squash all extra whitespace/newlines that gdb might use to make
comparisons of large structs easy.

gcc/testsuite/ChangeLog

* lib/gcc-gdb-test.exp (gdb-test): Handle type:var for gdb ptype
matching. Catch '<unknown type in ' to recognize older gdb versions.
* gcc.dg/guality/const-volatile.c: New test.

From-SVN: r214139
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/const-volatile.c [new file with mode: 0644]
gcc/testsuite/lib/gcc-gdb-test.exp