gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE.
gdb/ChangeLog: * gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE. All uses updated.
This commit is contained in:
parent
5f4ce105ed
commit
4bfb94b864
11 changed files with 26 additions and 21 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-01-31 Doug Evans <xdje42@gmail.com>
|
||||
|
||||
* gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE.
|
||||
All uses updated.
|
||||
|
||||
2015-01-31 Doug Evans <xdje42@gmail.com>
|
||||
|
||||
* gnu-v3-abi.c (gnuv3_dynamic_class): Assert only passed structs
|
||||
|
|
|
@ -315,11 +315,11 @@ c_type_print_varspec_prefix (struct type *type,
|
|||
case TYPE_CODE_MEMBERPTR:
|
||||
c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
|
||||
stream, show, 0, 0, flags);
|
||||
name = type_name_no_tag (TYPE_DOMAIN_TYPE (type));
|
||||
name = type_name_no_tag (TYPE_SELF_TYPE (type));
|
||||
if (name)
|
||||
print_name_maybe_canonical (name, flags, stream);
|
||||
else
|
||||
c_type_print_base (TYPE_DOMAIN_TYPE (type),
|
||||
c_type_print_base (TYPE_SELF_TYPE (type),
|
||||
stream, -1, passed_a_ptr, flags);
|
||||
fprintf_filtered (stream, "::*");
|
||||
break;
|
||||
|
@ -328,11 +328,11 @@ c_type_print_varspec_prefix (struct type *type,
|
|||
c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
|
||||
stream, show, 0, 0, flags);
|
||||
fprintf_filtered (stream, "(");
|
||||
name = type_name_no_tag (TYPE_DOMAIN_TYPE (type));
|
||||
name = type_name_no_tag (TYPE_SELF_TYPE (type));
|
||||
if (name)
|
||||
print_name_maybe_canonical (name, flags, stream);
|
||||
else
|
||||
c_type_print_base (TYPE_DOMAIN_TYPE (type),
|
||||
c_type_print_base (TYPE_SELF_TYPE (type),
|
||||
stream, -1, passed_a_ptr, flags);
|
||||
fprintf_filtered (stream, "::*");
|
||||
break;
|
||||
|
|
|
@ -764,7 +764,7 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type,
|
|||
/* VAL is a byte offset into the structure type DOMAIN.
|
||||
Find the name of the field for that offset and
|
||||
print it. */
|
||||
struct type *domain = TYPE_DOMAIN_TYPE (type);
|
||||
struct type *domain = TYPE_SELF_TYPE (type);
|
||||
LONGEST val;
|
||||
int fieldno;
|
||||
|
||||
|
|
|
@ -1390,7 +1390,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
else if (TYPE_CODE (type) == TYPE_CODE_MEMBERPTR)
|
||||
{
|
||||
struct type *type_ptr
|
||||
= lookup_pointer_type (TYPE_DOMAIN_TYPE (type));
|
||||
= lookup_pointer_type (TYPE_SELF_TYPE (type));
|
||||
struct type *target_type_ptr
|
||||
= lookup_pointer_type (TYPE_TARGET_TYPE (type));
|
||||
|
||||
|
@ -1934,7 +1934,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
|
||||
case TYPE_CODE_MEMBERPTR:
|
||||
/* Now, convert these values to an address. */
|
||||
arg1 = value_cast_pointers (lookup_pointer_type (TYPE_DOMAIN_TYPE (type)),
|
||||
arg1 = value_cast_pointers (lookup_pointer_type (TYPE_SELF_TYPE (type)),
|
||||
arg1, 1);
|
||||
|
||||
mem_offset = value_as_long (arg2);
|
||||
|
|
|
@ -805,7 +805,7 @@ allocate_stub_method (struct type *type)
|
|||
TYPE_LENGTH (mtype) = 1;
|
||||
TYPE_STUB (mtype) = 1;
|
||||
TYPE_TARGET_TYPE (mtype) = type;
|
||||
/* _DOMAIN_TYPE (mtype) = unknown yet */
|
||||
/* TYPE_SELF_TYPE (mtype) = unknown yet */
|
||||
return mtype;
|
||||
}
|
||||
|
||||
|
@ -1205,7 +1205,7 @@ smash_to_memberptr_type (struct type *type, struct type *domain,
|
|||
{
|
||||
smash_type (type);
|
||||
TYPE_TARGET_TYPE (type) = to_type;
|
||||
TYPE_DOMAIN_TYPE (type) = domain;
|
||||
TYPE_SELF_TYPE (type) = domain;
|
||||
/* Assume that a data member pointer is the same size as a normal
|
||||
pointer. */
|
||||
TYPE_LENGTH (type)
|
||||
|
@ -1224,7 +1224,7 @@ smash_to_methodptr_type (struct type *type, struct type *to_type)
|
|||
{
|
||||
smash_type (type);
|
||||
TYPE_TARGET_TYPE (type) = to_type;
|
||||
TYPE_DOMAIN_TYPE (type) = TYPE_DOMAIN_TYPE (to_type);
|
||||
TYPE_SELF_TYPE (type) = TYPE_SELF_TYPE (to_type);
|
||||
TYPE_LENGTH (type) = cplus_method_ptr_size (to_type);
|
||||
TYPE_CODE (type) = TYPE_CODE_METHODPTR;
|
||||
}
|
||||
|
@ -1243,7 +1243,7 @@ smash_to_method_type (struct type *type, struct type *domain,
|
|||
{
|
||||
smash_type (type);
|
||||
TYPE_TARGET_TYPE (type) = to_type;
|
||||
TYPE_DOMAIN_TYPE (type) = domain;
|
||||
TYPE_SELF_TYPE (type) = domain;
|
||||
TYPE_FIELDS (type) = args;
|
||||
TYPE_NFIELDS (type) = nargs;
|
||||
if (varargs)
|
||||
|
@ -2311,7 +2311,7 @@ check_stub_method (struct type *type, int method_id, int signature_id)
|
|||
|
||||
/* Now update the old "stub" type into a real type. */
|
||||
mtype = TYPE_FN_FIELD_TYPE (f, signature_id);
|
||||
TYPE_DOMAIN_TYPE (mtype) = type;
|
||||
TYPE_SELF_TYPE (mtype) = type;
|
||||
TYPE_FIELDS (mtype) = argtypes;
|
||||
TYPE_NFIELDS (mtype) = argcount;
|
||||
TYPE_STUB (mtype) = 0;
|
||||
|
|
|
@ -1233,7 +1233,7 @@ extern void allocate_gnat_aux_type (struct type *);
|
|||
/* C++ */
|
||||
|
||||
#define TYPE_VPTR_BASETYPE(thistype) TYPE_MAIN_TYPE(thistype)->vptr_basetype
|
||||
#define TYPE_DOMAIN_TYPE(thistype) TYPE_MAIN_TYPE(thistype)->vptr_basetype
|
||||
#define TYPE_SELF_TYPE(thistype) TYPE_MAIN_TYPE(thistype)->vptr_basetype
|
||||
#define TYPE_VPTR_FIELDNO(thistype) TYPE_MAIN_TYPE(thistype)->vptr_fieldno
|
||||
#define TYPE_NFN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields
|
||||
#define TYPE_SPECIFIC_FIELD(thistype) \
|
||||
|
|
|
@ -584,7 +584,7 @@ gnuv3_print_method_ptr (const gdb_byte *contents,
|
|||
struct type *type,
|
||||
struct ui_file *stream)
|
||||
{
|
||||
struct type *domain = TYPE_DOMAIN_TYPE (type);
|
||||
struct type *domain = TYPE_SELF_TYPE (type);
|
||||
struct gdbarch *gdbarch = get_type_arch (domain);
|
||||
CORE_ADDR ptr_value;
|
||||
LONGEST adjustment;
|
||||
|
@ -713,7 +713,7 @@ gnuv3_method_ptr_to_value (struct value **this_p, struct value *method_ptr)
|
|||
LONGEST adjustment;
|
||||
int vbit;
|
||||
|
||||
domain_type = TYPE_DOMAIN_TYPE (check_typedef (value_type (method_ptr)));
|
||||
domain_type = TYPE_SELF_TYPE (check_typedef (value_type (method_ptr)));
|
||||
final_type = lookup_pointer_type (domain_type);
|
||||
|
||||
method_type = TYPE_TARGET_TYPE (check_typedef (value_type (method_ptr)));
|
||||
|
|
|
@ -188,7 +188,7 @@ m2_range (struct type *type, struct ui_file *stream, int show,
|
|||
int level, const struct type_print_options *flags)
|
||||
{
|
||||
if (TYPE_HIGH_BOUND (type) == TYPE_LOW_BOUND (type))
|
||||
m2_print_type (TYPE_DOMAIN_TYPE (type), "", stream, show, level,
|
||||
m2_print_type (TYPE_SELF_TYPE (type), "", stream, show, level,
|
||||
flags);
|
||||
else
|
||||
{
|
||||
|
|
|
@ -239,7 +239,7 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
|
|||
if (passed_a_ptr)
|
||||
{
|
||||
fprintf_filtered (stream, " ");
|
||||
pascal_type_print_base (TYPE_DOMAIN_TYPE (type),
|
||||
pascal_type_print_base (TYPE_SELF_TYPE (type),
|
||||
stream, 0, passed_a_ptr, flags);
|
||||
fprintf_filtered (stream, "::");
|
||||
}
|
||||
|
|
|
@ -2380,8 +2380,8 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
|
|||
|
||||
if (TYPE_STUB (new_sublist->fn_field.type))
|
||||
{
|
||||
if (!TYPE_DOMAIN_TYPE (new_sublist->fn_field.type))
|
||||
TYPE_DOMAIN_TYPE (new_sublist->fn_field.type) = type;
|
||||
if (!TYPE_SELF_TYPE (new_sublist->fn_field.type))
|
||||
TYPE_SELF_TYPE (new_sublist->fn_field.type) = type;
|
||||
new_sublist->fn_field.is_stub = 1;
|
||||
}
|
||||
new_sublist->fn_field.physname = savestring (*pp, p - *pp);
|
||||
|
|
|
@ -2544,7 +2544,7 @@ find_overload_match (struct value **args, int nargs,
|
|||
value_find_oload_method_list above. */
|
||||
if (fns_ptr)
|
||||
{
|
||||
gdb_assert (TYPE_DOMAIN_TYPE (fns_ptr[0].type) != NULL);
|
||||
gdb_assert (TYPE_SELF_TYPE (fns_ptr[0].type) != NULL);
|
||||
|
||||
src_method_oload_champ = find_oload_champ (args, nargs,
|
||||
num_fns, fns_ptr, NULL,
|
||||
|
@ -3360,7 +3360,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
|
|||
type = check_typedef (value_type (ptr));
|
||||
gdb_assert (type != NULL
|
||||
&& TYPE_CODE (type) == TYPE_CODE_MEMBERPTR);
|
||||
tmp = lookup_pointer_type (TYPE_DOMAIN_TYPE (type));
|
||||
tmp = lookup_pointer_type (TYPE_SELF_TYPE (type));
|
||||
v = value_cast_pointers (tmp, v, 1);
|
||||
mem_offset = value_as_long (ptr);
|
||||
tmp = lookup_pointer_type (TYPE_TARGET_TYPE (type));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue