Remove last cleanups from stabsread.c
authorTom Tromey <tom@tromey.com>
Thu, 24 Jan 2019 16:51:19 +0000 (09:51 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 6 Mar 2019 23:04:31 +0000 (16:04 -0700)
commit61b30099702a76fb7e6a9c5dba7c03b95f9eb0f2
treee40a90e10a92af76c33ab6441da64ea9596c1299
parent6cceac94147f6026e93dcfc0a0df03555b571a12
Remove last cleanups from stabsread.c

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.

2019-03-06  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.
gdb/ChangeLog
gdb/stabsread.c
This page took 0.028998 seconds and 4 git commands to generate.