summaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-06 14:46:59 +0000
committerTom Tromey <tromey@redhat.com>2012-07-06 14:46:59 +0000
commit484118c3151e97ad0207fe6a6f35438e64d3c65a (patch)
tree9f4e448882ab439f6697f88df2aac4581de4579f /gdb/parser-defs.h
parent42ad8e35a1273caaefa962edf8324845445218c1 (diff)
downloadgdb-484118c3151e97ad0207fe6a6f35438e64d3c65a.tar.gz
PR exp/9608:
* c-exp.y (%union) <tvec>: Change type. (func_mod): Now uses <tvec> type. (exp): Update for tvec change. (direct_abs_decl): Push the typelist. (func_mod): Return a typelist. (nonempty_typelist): Update for tvec change. * gdbtypes.c (lookup_function_type_with_arguments): New function. * gdbtypes.h (lookup_function_type_with_arguments): Declare. * parse.c (pop_type_list): New function. (push_typelist): New function. (follow_types): Handle tp_function_with_arguments. * parser-defs.h (type_ptr): New typedef. Define a VEC. (enum type_pieces) <tp_function_with_arguments>: New constant. (union type_stack_elt) <typelist_val>: New field. (push_typelist): Declare. testsuite * gdb.base/whatis.exp: Add regression test.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 06491893ddc..86f3bdf1063 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -25,6 +25,7 @@
#define PARSER_DEFS_H 1
#include "doublest.h"
+#include "vec.h"
struct block;
@@ -107,6 +108,8 @@ struct objc_class_str
int class;
};
+typedef struct type *type_ptr;
+DEF_VEC_P (type_ptr);
/* For parsing of complicated types.
An array should be preceded in the list by the size of the array. */
@@ -116,7 +119,8 @@ enum type_pieces
tp_pointer,
tp_reference,
tp_array,
- tp_function,
+ tp_function,
+ tp_function_with_arguments,
tp_const,
tp_volatile,
tp_space_identifier,
@@ -128,6 +132,7 @@ union type_stack_elt
enum type_pieces piece;
int int_val;
struct type_stack *stack_val;
+ VEC (type_ptr) *typelist_val;
};
/* The type stack is an instance of this structure. */
@@ -225,6 +230,8 @@ extern void push_type_stack (struct type_stack *stack);
extern void type_stack_cleanup (void *arg);
+extern void push_typelist (VEC (type_ptr) *typelist);
+
extern int length_of_subexp (struct expression *, int);
extern int dump_subexp (struct expression *, struct ui_file *, int);