summaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2001-11-15 01:55:59 +0000
committerMichael Snyder <msnyder@specifix.com>2001-11-15 01:55:59 +0000
commitf9921b25d62ef78536837ff7953ebc19b90ae84f (patch)
tree41a61c371d3e3b5fc637b70a17e4a9bc8ea10484 /gdb/parser-defs.h
parent9e5d49ae3f967a5dc200a65f407b7cc6de9f647a (diff)
downloadgdb-f9921b25d62ef78536837ff7953ebc19b90ae84f.tar.gz
2001-11-14 Michael Snyder <msnyder@redhat.com>
Add address space identifiers to expression language for types. * c-exp.y (space_identifier, cv_with_space_id, const_or_volatile_or_space_identifier_noopt, const_or_volatile_or_space_identifier): New terminals. (ptype): Accept const_or_volatile_or_space_identifier. (typebase): Accept const_or_volatile_or_space_identifier. * c-typeprint.c (c_type_print_cv_qualifier): Rename to c_type_print_modifier. Handle address space modified types. * gdbtypes.h (TYPE_FLAG_CODE_SPACE, TYPE_FLAG_DATA_SPACE): New type flags. (struct type): Add new field as_type for addr-space qualified types. (TYPE_AS_TYPE): New macro, retrieves the chain of types that are identical to this one except for address-space qualification. * gdbtypes.c (alloc_type): Initialize new field 'as_type'. (address_space_name_to_int): New function. (address_space_int_to_name): New function. (make_type_with_address_space): New function. (make_cv_type): Handle as_type field of new struct type object. * parse.c (check_type_stack_depth): New function. (push_type_address_space): New function. (follow_types): Handle types with address-space qualifier. * parser-defs.h (enum type_pieces): Add enum tp_space_identifier.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index bd7fb39e4b7..66e929f6f3a 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -90,7 +90,8 @@ enum type_pieces
tp_array,
tp_function,
tp_const,
- tp_volatile
+ tp_volatile,
+ tp_space_identifier
};
/* The stack can contain either an enum type_pieces or an int. */
union type_stack_elt
@@ -141,6 +142,8 @@ extern void push_type (enum type_pieces);
extern void push_type_int (int);
+extern void push_type_address_space (char *);
+
extern enum type_pieces pop_type (void);
extern int pop_type_int (void);