| Index: gdb/testsuite/gdb.base/whatis.exp
|
| diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp
|
| index 825eb7fe503b98c040929e8de8b22d048e136a4c..18edc4c48b3f28ede87dd3e6dea16e28b9279dac 100644
|
| --- a/gdb/testsuite/gdb.base/whatis.exp
|
| +++ b/gdb/testsuite/gdb.base/whatis.exp
|
| @@ -16,10 +16,6 @@
|
|
|
| # This file was written by Rob Savoye. (rob@cygnus.com)
|
|
|
| -if $tracelevel {
|
| - strace $tracelevel
|
| -}
|
| -
|
| #
|
| # test running programs
|
| #
|
| @@ -40,7 +36,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $exe
|
|
|
| # Create and source the file that provides information about the compiler
|
| # used to compile the test case.
|
| -if [get_compiler_info ${binfile}] {
|
| +if [get_compiler_info] {
|
| return -1;
|
| }
|
|
|
| @@ -469,3 +465,45 @@ gdb_test "whatis char_addr" \
|
| gdb_test "whatis a_char_addr" \
|
| "type = char_addr" \
|
| "whatis applied to variable defined by typedef"
|
| +
|
| +# Regression tests for PR 9514.
|
| +
|
| +gdb_test "whatis void (**)()" \
|
| + "type = void \\(\\*\\*\\)\\(\\)" \
|
| + "whatis applied to pointer to pointer to function"
|
| +
|
| +gdb_test "whatis void (** const)()" \
|
| + "type = void \\(\\*\\* const\\)\\(\\)" \
|
| + "whatis applied to const pointer to pointer to function"
|
| +
|
| +gdb_test "whatis void (* const *)()" \
|
| + "type = void \\(\\* const \\*\\)\\(\\)" \
|
| + "whatis applied to pointer to const pointer to function"
|
| +
|
| +gdb_test "whatis int *(*)()" \
|
| + "type = int \\*\\(\\*\\)\\(\\)" \
|
| + "whatis applied to pointer to function returning pointer to int"
|
| +
|
| +gdb_test "whatis int *(**)()" \
|
| + "type = int \\*\\(\\*\\*\\)\\(\\)" \
|
| + "whatis applied to pointer to pointer to function returning pointer to int"
|
| +
|
| +gdb_test "whatis char (*(*)())\[23\]" \
|
| + "type = char \\(\\*\\(\\*\\)\\(\\)\\)\\\[23\\\]" \
|
| + "whatis applied to pointer to function returning pointer to array"
|
| +
|
| +gdb_test "whatis int (*)(int, int)" \
|
| + "type = int \\(\\*\\)\\(int, int\\)" \
|
| + "whatis applied to pointer to function taking int,int and returning int"
|
| +
|
| +gdb_test "whatis int (*)(const int *, ...)" \
|
| + "type = int \\(\\*\\)\\(const int \\*, \\.\\.\\.\\)" \
|
| + "whatis applied to pointer to function taking const int ptr and varargs and returning int"
|
| +
|
| +gdb_test "whatis int (*)(void, int, int)" \
|
| + "parameter types following 'void'" \
|
| + "whatis applied to function with types trailing 'void'"
|
| +
|
| +gdb_test "whatis int (*)(int, void, int)" \
|
| + "'void' invalid as parameter type" \
|
| + "whatis applied to function with 'void' parameter type"
|
|
|