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: solib_break from _r_debug.r_brk


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.



Thanks,


Aleksandar


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