[PATCH v2 10/22] Remove last cleanups from stabsread.c
Pedro Alves
palves@redhat.com
Wed Mar 6 21:14:00 GMT 2019
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
More information about the Gdb-patches
mailing list