This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 10/22] Remove last cleanups from stabsread.c
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 6 Mar 2019 21:14:08 +0000
- Subject: Re: [PATCH v2 10/22] Remove last cleanups from stabsread.c
- References: <20190227201849.32210-1-tom@tromey.com> <20190227201849.32210-11-tom@tromey.com>
On 02/27/2019 08:18 PM, Tom Tromey wrote:
> This removes the last cleanups from stabsread.c. Similar code in
> dwarf2read.c was C++-ified, but considering that stabs are deprecated,
> it seemed simpler to just change these allocations to use an obstack
> and leave the data structures in place.
>
> This patch renames field_info to stabs_field_info -- adding a
> constructor here provoked a bug due to the resulting ODR violation.
>
> gdb/ChangeLog
> 2019-02-27 Tom Tromey <tom@tromey.com>
>
> * stabsread.c (struct stabs_field_info): Rename from field_info.
> <list, fnlist>: Add initializers.
> <obstack>: New member.
> (read_member_functions, read_struct_fields, read_baseclasses):
> Allocate on obstack. Don't use cleanups.
> (read_one_struct_field, read_member_functions, read_struct_fields)
> (read_baseclasses, read_tilde_fields, attach_fn_fields_to_type)
> (attach_fields_to_type, read_cpp_abbrev, read_member_functions)
> (read_struct_type): Update.
LGTM.
Thanks,
Pedro Alves