This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: solib.c:solib_map_sections so->so_name clobbering
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 28 Mar 2013 09:38:48 -0600
- Subject: Re: RFC: solib.c:solib_map_sections so->so_name clobbering
- References: <87r4s83lu5 dot fsf at fleche dot redhat dot com> <20130328011107 dot GA17105 at adacore dot com>
>>>>> "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