[PP?] [PATCH] Remove objfile parameter from abbrev_table::read

Simon Marchi simark@simark.ca
Thu Nov 5 01:15:53 GMT 2020


On 2020-11-04 6:10 p.m., Tom Tromey wrote:
> In a longer series that I am working on, I needed to remove the
> objfile parameter from abbrev_table::read.  It seemed to me that this
> was a simple and relatively harmless patch, so I'm sending it now.
>
> gdb/ChangeLog
> 2020-11-04  Tom Tromey  <tom@tromey.com>
>
> 	* dwarf2/read.c (read_cutu_die_from_dwo)
> 	(cutu_reader::cutu_reader, cutu_reader::cutu_reader)
> 	(build_type_psymtabs_1): Update.
> 	* dwarf2/abbrev.h (struct abbrev_table): Remove objfile
> 	parameter.
> 	* dwarf2/abbrev.c (abbrev_table::read): Remove objfile parameter.
> 	Don't read section.

LGTM, though I'd add a note in the abbrev_table::read comment, that the
caller is responsible to make sure the section is read in.  As well as
an assert in abbrev_table::read that checks it.

Simon


More information about the Gdb-patches mailing list