+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
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;
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;
/* 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;
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));
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);
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;
}
{
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)
{
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;
}
{
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)
/* 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;
/* 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) \
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;
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)));
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
{
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, "::");
}
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);
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,
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));