OSDN Git Service

2001-11-14 Michael Snyder <msnyder@redhat.com>
authormsnyder <msnyder>
Thu, 15 Nov 2001 01:55:59 +0000 (01:55 +0000)
committermsnyder <msnyder>
Thu, 15 Nov 2001 01:55:59 +0000 (01:55 +0000)
commit167290d16edf286a9aeb63a630c059b4ec67788b
treefa2dabeda49ab9e9e5ed8cc642ee1a0f36537063
parent096177bd921fa48c92c1d7ddea2013539176776a
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.
gdb/ChangeLog
gdb/c-exp.y
gdb/c-typeprint.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/parse.c
gdb/parser-defs.h