This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: dlmopen and core dumps


On 12/19/2012 06:20 PM, Carlos O'Donell wrote:

> That's an interesting option, and if someone wants to flesh out a design for that *or* a python-based solution I'd be more than willing to review it and discuss it.
> 
> At present there appear to be three solutions:
> 
> (1) Investigate r_debug solution, it's incremental, and ugly, but we know it works.

As they say, beauty is in the eye of the beholder.  ;-)

> 
> (2) Investigate a python based solution, usable by gdb or other tools via a python interpreter.
> 

I hope the negative feedback has been sufficient to discard this one.

> (3) Investigate a DWARF based declarative solution.

I can split this in (at least) two variants:

 - always somehow provide debug info for _r_debug.  IOW, the structure's fields
   and semantics would be known to the debugger, but the specific layout of the
   fields in memory would be described by the debug info, in the usual way.  Walking
   the list would mean following the next pointer, as today.

 - somehow provide to a debugger DWARF expressions for:

   "Get me the address of the first entry in the DSO list."
   "Get me the value of a property XXX of this DSO".
   "I have this DSO entry.  Get me the next entry."

Is any of this really necessary?  To me, the latter is appealing iff there
are real plans of changing the loader's structures, _and_ removing
_r_debug.  But not if we're stuck with _r_debug forever.  The former doesn't
appear to bring that much value in compared to hard coding field offsets.

> We know (1) is not appealing.

It's appealing to me, as pragmatically speaking, it looks like if we don't
go with (1), then since dlmopen isn't really a pressing concern, the
issue will remain unsolved.

> At this point I think someone needs to investigate (2) and (3) in more detail. That someone is probably Gary Benson :-)
> 
> Does that make sense?

-- 
Pedro Alves


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