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: RFE: dl_iterate_phdr, r_debug.r_brk usability for introspection


Andreas Schwab wrote:
John Reiser <jreiser@bitwagon.com> writes:

In struct r_debug, change from
     ElfW(Addr) r_brk;
to
     int (*r_brk)(struct r_debug *, unsigned long);
and make .r_brk be a read+write member that is honored by ld-linux.
Instead of ld_linux always calling the same internal function
(with .r_brk being its address), have ld-linux call:
     (void) (*r_debug.r_brk)(&r_debug, 0ul);

What is the meaning of the second parameter?

The second parameter is not yet completely designed.
Probably it is some combination of an enum and flag bits.
Zero signifies the current only use of .r_brk: notify
on change of dynamic loading state.  Possible uses for other
values might be to mark other classes of notification:
mutual exclusion conditions, thread state, FILE conditions, etc.
The general direction is to facilitate introspection, and for
the app and glibc to have a conversation _about_ what is happening,
while it is happening.


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