Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Unified Diff: gdb/testsuite/gdb.base/whatis.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/whatis.c ('k') | gdb/testsuite/gdb.base/whatis-exp.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
« no previous file with comments | « gdb/testsuite/gdb.base/whatis.c ('k') | gdb/testsuite/gdb.base/whatis-exp.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698