RFC: solib.c:solib_map_sections so->so_name clobbering
Tom Tromey
tromey@redhat.com
Thu Mar 28 19:12:00 GMT 2013
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> With that in mind, I think the overwriting of the so_name might not
Joel> be needed or make much sense anymore. Removing it should fix the
Joel> regression on Darwin, and also help in the case of my work with the
Joel> solib-aix patch [1].
Joel> What do you (or others!) think? I am happy to test and submit a proper
Joel> patch.
It sounds reasonable to me.
I'm sorry about the mess here.
Joel> We wouldn't be able to use a patch like this on the 7.6 branch,
Joel> so for Darwin, I'd restore the xstrdup below - it would be a memory
Joel> leak, but better to have a leak than not having the shared library name,
Joel> IMO.
You can make it not leak by using bfd_alloc.
Tom
More information about the Gdb-patches
mailing list