This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: remove deprecated_sym_stab_info
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 12 Dec 2012 15:37:41 +0400
- Subject: Re: RFC: remove deprecated_sym_stab_info
- References: <87y5h49uez.fsf@fleche.redhat.com>
> I've been meaning to remove deprecated_sym_stab_info for a while now,
> and I finally got around to doing so.
Thanks a lot for doing that.
> * coffread.c (coff_symfile_init): Use set_objfile_data.
> (coff_symfile_read): Use DBX_SYMFILE_INFO.
> * dbxread.c (dbx_objfile_data_key): New global.
> (dbx_symfile_init): Use set_objfile_data.
> (dbx_symfile_finish): Don't free deprecated_sym_stab_info.
> (dbx_free_symfile_info): New function.
> (coffstab_build_psymtabs, elfstab_build_psymtabs): Use
> DBX_SYMFILE_INFO.
> (stabsect_build_psymtabs): Use set_objfile_data.
> (_initialize_dbxreadb): Initialize dbx_objfile_data_key.
> * elfread.c (elf_symtab_read): Use DBX_SYMFILE_INFO,
> set_objfile_data.
> (free_elfinfo): Use DBX_SYMFILE_INFO.
> (elf_symfile_finish): Don't free deprecated_sym_stab_info.
> (elfstab_offset_sections): Use DBX_SYMFILE_INFO.
> * gdb-stabs.h (dbx_objfile_data_key): Declare.
> (DBX_SYMFILE_INFO): Rewrite to use objfile_data.
> * objfiles.h (struct objfile) <deprecated_sym_stab_info>: Remove.
> * somread.c (som_symfile_finish): Don't free
> deprecated_sym_stab_info.
Tested succesfully on ppc-aix and x86-windows (both using GNU ld
and DWARF - no stabs support anymore).
I went through the patch, and it looks pretty good to me.
It also made me wonder whether we might want to get rid of the various
*HEADER* macros in stabsread.h, and force us to have a struct
dbx_symfile_info * local instead. For another day...
--
Joel