dlmopen and core dumps
Pedro Alves
palves@redhat.com
Thu Jan 3 18:23:00 GMT 2013
Sorry for the delay. I had been on vacation these past weeks.
On 12/18/2012 12:14 AM, Roland McGrath wrote:
>> In the case of in-process code that needs to do introspection,
>> dl_iterate_phdr also misses the other namespaces, right?
>
> Yes. Which is to say, it always reports about the namespace containing
> the caller of dl_iterate_phdr.
>
>> If going the external-file route, I'd much rather glibc provided a
>> declarative file, that describes where to find things, in a
>> non-procedural way. That could then be consumed by GDB in python, GDB
>> native code, or whatever else wants to get at the info.
>
> I'd like that too. I was hoping for such a thing to be an option for the
> pretty-printers too years ago now, before the Python method was chosen by
> the GDB camp. As there is today no such general declarative facility
> available to drive GDB, complaining about some application or library not
> using it is a non sequitur.
Any solution we come up with will need coding in GDB _and_ in gdbserver,
along with other debuggers, even if going the Python way. So, no, it's not.
> The options available today are GDB's Python
> support and hard-coded knowledge of data structure layouts in GDB.
The latter isn't really a problem, as long as a structure is considered
ABI and hence doesn't change layout incompatibly.
--
Pedro Alves
More information about the Libc-alpha
mailing list