This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 13/15] Add psymtab_storage::allocate_dependencies
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: Tom Tromey <tom at tromey dot com>, <gdb-patches at sourceware dot org>
- Date: Sun, 23 Sep 2018 15:24:59 -0600
- Subject: Re: [RFA 13/15] Add psymtab_storage::allocate_dependencies
- References: <20180510222357.27332-1-tom@tromey.com> <20180510222357.27332-14-tom@tromey.com> <f42109ab-45e6-c1ec-9193-abd0894b8be4@ericsson.com>
>>>>> "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