Re: [RFA 13/15] Add psymtab_storage::allocate_dependencies

Simon Marchi
2018-07-18T14:32:04Z

On 2018-05-10 06:23 PM, Tom Tromey wrote:
> diff --git a/gdb/dbxread.c b/gdb/dbxread.c
> index c3741fda8a..e1aed48ff7 100644
> --- a/gdb/dbxread.c
> +++ b/gdb/dbxread.c
> @@ -2092,13 +2092,8 @@ dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst,
>
> pst->number_of_dependencies = number_dependencies;
> if (number_dependencies)
> - {
> - pst->dependencies = XOBNEWVEC (&objfile->objfile_obstack,
> - struct partial_symtab *,
> - number_dependencies);
> - memcpy (pst->dependencies, dependency_list,
> - number_dependencies * sizeof (struct partial_symtab *));
> - }
> + pst->dependencies
> + = objfile->partial_symtabs->allocate_dependencies (number_dependencies);

There is a memcpy that disappears here, probably not intended? Same in xcoffread.

Otherwise, LGTM.

Simon