From 4bfb94b8648cebad2683d24ebe033ef539df1dbb Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Sat, 31 Jan 2015 21:17:05 -0800 Subject: [PATCH] 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. --- gdb/ChangeLog | 5 +++++ gdb/c-typeprint.c | 8 ++++---- gdb/cp-valprint.c | 2 +- gdb/eval.c | 4 ++-- gdb/gdbtypes.c | 10 +++++----- gdb/gdbtypes.h | 2 +- gdb/gnu-v3-abi.c | 4 ++-- gdb/m2-typeprint.c | 2 +- gdb/p-typeprint.c | 2 +- gdb/stabsread.c | 4 ++-- gdb/valops.c | 4 ++-- 11 files changed, 26 insertions(+), 21 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 18cbf2edd8..6a790d38a5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-01-31 Doug Evans + + * gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE. + All uses updated. + 2015-01-31 Doug Evans * gnu-v3-abi.c (gnuv3_dynamic_class): Assert only passed structs diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index c94534e172..5a1b25fceb 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -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; diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index bf1a600af5..9eea7cec8a 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -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; diff --git a/gdb/eval.c b/gdb/eval.c index 72ac69f29c..e6ab662dbc 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -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); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 0c34e62688..ad516c2507 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -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; diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 034df493e0..7f90ec6cd8 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -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) \ diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index a62599bf20..eddda4f494 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -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))); diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c index 79a2a8758b..4e82938104 100644 --- a/gdb/m2-typeprint.c +++ b/gdb/m2-typeprint.c @@ -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 { diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index 239869171f..5a7a887253 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -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, "::"); } diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 6862c52522..1f46f757c8 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -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); diff --git a/gdb/valops.c b/gdb/valops.c index 8cbac8561a..23a4b3778f 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -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)); -- 2.34.1