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

Tom Tromey
2018-09-23T21:25:31Z

>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:

Simon> 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);

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

Thanks, I fixed this. There was also a spot in dbxread.c where there
should have been another change to call allocate_dependencies; I fixed
this as well.

Tom