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] Fix seg fault with --write PR gdb/20948


On 2018-03-13 18:43, Jozef Lawrynowicz wrote:
Hi Simon,

I missed the example in comment #3, you are right there is a general issue with
BFD rather than this being GDB specific.

It seems that the internal representation of SHSTRTAB (elf_shstrtab(bfd)) does not get initialized or populated when opening an existing BFD. This is not an issue when only reading, as this specific internal representation is not required. It is also not an issue (or at least doesn't cause any errors) when only writing as a new shstrtab is created. But when reading and writing, elf_shstrtab needs to be populated using the existing elf data in the loaded
BFD and this doesn't happen at the moment.

I'm working on a patch.

I reckon when the BFD issue is fixed, we may not need any specific patch for
GDB.

Thanks,
Jozef

Ok, thanks for looking into it.

Simon


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