This is the mail archive of the
mailing list for the GDB project.
Re: patch: solib_break from _r_debug.r_brk
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 03 Oct 2011 15:50:45 -0400
- Subject: Re: patch: solib_break from _r_debug.r_brk
- References: <firstname.lastname@example.org> <4E847A11.email@example.com> <firstname.lastname@example.org> <email@example.com>
I will have to withdraw this patch.
The reason is that on gnu ld, this would not work since _r_debug is
initialized differently, causing it to always read zero.
In theory, when attaching to a running process, this patch could still
yield sensible results, but then I'm not sure it is generic enough to
warrant inclusion in the official sources.
For completeness, here are two other things I have found further testing
the patch on gnu/linux:
sym->section for _r_debug will be SEC_ALLOC so cmp_name_and_sec_flags
would always return 0.
Second issue is that once the symbol is correctly found, fetched address
would have to be checked for relocation since it could be already
relocated in case of attaching to a running process.
Due to above, even though the patch works fine for me, I see no point
pursuing it further for fsf gdb.