From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 3/4] Remove TYPE_TAG_NAME
Date: Thu, 31 May 2018 02:35:00 -0000 [thread overview]
Message-ID: <20180531013341.bbsus52d5f6fwkss@adacore.com> (raw)
In-Reply-To: <20180417195125.14200-4-tom@tromey.com>
> TYPE_TAG_NAME has been an occasional source of confusion and bugs. It
> seems to me that it is only useful for C and C++ -- but even there,
> not so much, because at least with DWARF there doesn't seem to be any
> way to wind up with a type where the name and the tag name are both
> non-NULL and different.
>
> So, this patch removes TYPE_TAG_NAME entirely. This should save a
> little memory, but more importantly, it simplifies this part of gdb.
>
> A few minor test suite adjustments were needed. In some situations
> the new code does not yield identical output to the old code.
>
> ChangeLog
> 2018-04-17 Tom Tromey <tom@tromey.com>
>
> * valops.c (enum_constant_from_type, value_namespace_elt)
> (value_maybe_namespace_elt): Update.
> * valarith.c (find_size_for_pointer_math): Update.
> * target-descriptions.c (make_gdb_type): Update.
> * symmisc.c (print_symbol): Update.
> * stabsread.c (define_symbol, read_type)
> (complain_about_struct_wipeout, add_undefined_type)
> (cleanup_undefined_types_1): Update.
> * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
> (rust_range_type_p, val_print_struct, rust_print_struct_def)
> (rust_internal_print_type, rust_composite_type)
> (rust_evaluate_funcall, rust_evaluate_subexp): Update.
> * python/py-type.c (typy_get_tag): Update.
> * p-typeprint.c (pascal_type_print_base): Update.
> * mdebugread.c (parse_symbol, parse_type): Update.
> * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
> Update.
> * guile/scm-type.c (gdbscm_type_tag): Update.
> * go-lang.c (sixg_string_p): Update.
> * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
> Update.
> * gdbtypes.h (struct main_type) <tag_name>: Remove.
> (TYPE_TAG_NAME): Remove.
> * gdbtypes.c (type_name_no_tag): Simplify.
> (check_typedef, check_types_equal, recursive_dump_type)
> (copy_type_recursive, arch_composite_type): Update.
> * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
> in summary mode when needed.
> * eval.c (evaluate_funcall): Update.
> * dwarf2read.c (fixup_go_packaging, read_structure_type)
> (process_structure_scope, read_enumeration_type)
> (read_namespace_type, read_module_type, determine_prefix): Update.
> * cp-support.c (inspect_type): Update.
> * coffread.c (process_coff_symbol, decode_base_type): Update.
> * c-varobj.c (c_is_path_expr_parent): Update.
> * c-typeprint.c (c_type_print_base_struct_union): Update.
> (c_type_print_base_1): Update. Print struct/class/union/enum in
> summary when using C language.
> * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
> (gen_maybe_namespace_elt): Update.
> * ada-lang.c (ada_type_name): Simplify.
> (empty_record, ada_template_to_fixed_record_type_1)
> (template_to_static_fixed_type)
> (to_record_with_fixed_variant_part, ada_check_typedef): Update.
>
> testsuite/ChangeLog
> 2018-04-17 Tom Tromey <tom@tromey.com>
>
> * gdb.xml/tdesc-regs.exp (load_description): Update expected
> results.
> * gdb.dwarf2/method-ptr.exp: Set language to C++.
> * gdb.dwarf2/member-ptr-forwardref.exp: Set language to C++.
> * gdb.cp/typeid.exp (do_typeid_tests): Update type_re.
> * gdb.base/maint.exp (maint_pass_if): Update.
This looks good to me. Perhaps add the comment that Keith mentioned
about the use of language_minimal in c_type_print_base_1. Sometimes,
I wonder whether we might have over-engineered that thing.
Thanks!
--
Joel
next prev parent reply other threads:[~2018-05-31 1:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 19:51 [RFA 0/4] " Tom Tromey
2018-04-17 19:51 ` [RFA 4/4] Remove type_name_no_tag and rename type_name_no_tag_or_error Tom Tromey
2018-05-31 6:22 ` Joel Brobecker
2018-04-17 19:51 ` [RFA 2/4] Thread language through c_type_print_args Tom Tromey
2018-04-18 17:53 ` Tom Tromey
2018-05-31 1:37 ` Joel Brobecker
2018-04-17 19:51 ` [RFA 1/4] Make c_type_print_varspec_suffix static Tom Tromey
2018-05-31 1:33 ` Joel Brobecker
2018-04-17 19:51 ` [RFA 3/4] Remove TYPE_TAG_NAME Tom Tromey
2018-04-18 16:57 ` Keith Seitz
2018-04-18 17:57 ` Tom Tromey
2018-04-18 18:06 ` Keith Seitz
2018-05-31 2:35 ` Joel Brobecker [this message]
2018-04-18 16:57 ` [RFA 0/4] " Keith Seitz
2018-05-09 15:42 ` Tom Tromey
2018-05-25 17:30 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180531013341.bbsus52d5f6fwkss@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox