This is the mail archive of the gdb-patches@sources.redhat.com 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: unwind support for Linux 2.6 vsyscall DSO


On Oct 9,  3:20pm, Roland McGrath wrote:

> > Daniel Jacobowitz <drow@mvista.com> writes:
> > > The problem with using SOLIB_ADD for this is that we can't SOLIB_ADD
> > > safely till we hit the dynamic linker breakpoint, but it would be
> > > _really_ nice to be able to load this object right after the inferior
> > > starts (and for static binaries, etc etc).  How would you suggets we do
> > > that?
> > 
> > Well, look, the whole association with SOLIB_ADD at all was just based
> > on the intuition that "Hey, this vsyscall thing is like a shared
> > library!"  Nothing more profound than that.  So if it turns out that
> > sticking with SOLIB_ADD makes things complicated, then it'd be much
> > better to just add calls to the core, attach, and run code, or
> > whereever else is appropriate, that does things exactly the way you
> > want.
> 
> In the prior discussion I got the impression that SOLIB_ADD did happen
> early enough (right after the exec stop), and just got repeated more times
> later when there is actually anything in the dynamic linker's list.  Is
> that not accurate?

SOLIB_ADD will only be called when the dynamic linker's "hey, I've
just (un)loaded something new" breakpoint has been hit.  (More
precisely, this is the breakpoint placed at r_brk in the r_debug
struct.) This occurs quite early in the execution of the program, but
it might not be early enough.  Also, as Daniel alludes, it won't
happen at all for static binaries.

Kevin


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