This is the mail archive of the 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: auto-solib-add when attaching to inferior

> > When I run a remote process using our QNX remote protocol, I get a solib
> > breakpoint set properly and from then on, if solibs are loaded, their
> > symbols automatically get added (auto-solib-add is on by default).  If,
> > however, I attach to the process, even if auto-solib-add is on, I still
> > to go 'shared' to get them to load.  If I 'maint info breakpoints' on
> > attached process, I see that there isn't a shlib-events breakpoint set
> > the attached process so I assume either enable_break() isn't getting
> > or is failing.
> >
> > I'm still building my debug gdb to test but I'm hoping someone will tell
> > "Oh, when you attach you should always call such-and-such function" and
> > can just add it to our back end code.
> Search for SOLIB in remote.c and see if that helps.

I didn't see an explicit "remote_ops.to_attach" in remote.c function but I
notice that you're doing SOLIB_CREATE_INFERIOR_HOOK.  We also do that when
we create a process.  Just for chuckles, I tried to do that in our to_attach
function but it didn't work.  If I call it before I set inferior_ptid to the
child process, I get a solib_event_bkpt that is relocated incorrectly.  If I
do it after, then for some reason the target_wait() function spins blocks
forever trying to read from the inferior.  On the bright side, the
relocation of the solib breakpoint is done correctly (I printed the
breakpoint_chain) but the lockup is a real puzzle.  I'm wondering if somehow
my host and target are getting out of sync.  Fun, fun, fun.  I think I'm
going to have to attach to our remote agent and see what the heck it thinks
its doing.



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