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: [PATCH] [dwarf2read] Fix crash when loading dwp files: calculate num_sections based on actual section indices, not just the number of sections.


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

>> -  dwp_file->num_sections = bfd_count_sections (dwp_file->dbfd) + 1;
>> +  dwp_file->num_sections = elf_numsections (dwp_file->dbfd);

Simon> I have tweaked the original commit message a bit and pushed.
Simon> Thanks again for the patch.

I wonder if there's any way to reach this with a non-ELF objfile --
Mach-O seems probable.  I think we also handle DWARF on AIX (ECOFF IIRC)
but I don't know if that does dwp.

Tom


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