This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]