This is the mail archive of the gdb@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: pthreads debug with gdbserver


On Fri, Nov 19, 2004 at 04:41:15PM +0200, Vladimir Vorobyov wrote:
> On Friday 19 November 2004 04:22 pm, Daniel Jacobowitz wrote:
> > On Fri, Nov 19, 2004 at 12:33:22PM +0200, Vladimir Vorobyov wrote:
> > > I see that shlib breakpoint is set and hit but gdb does not load the
> > > libraries. I can see in strace that it successfully loads ld.so. What
> > > should I look at?
> 
> > "info shared".  Maybe strace GDB to see what it's opening and whether
> > it fails to find any files.
> 
> info shared reports: "No shared libraries loaded at this time".
> Straces shows that gdb opens only ld.so file.
> When adding printf to solibopen it also shows only ld.so.
> Who is responsible for loading shared libs ? What file/function/event?

This usually means that the ld.so GDB has opened is not -exactly- the
same as the one on your target; and then it has set the solib event
breakpoint at the wrong location, and it hasn't been hit.  Take a look
at solib-svr4.c if you want more details.

> Yes, the problem number one is that GDB does not auto loads shared libs.
> Is it not the same when I manually add-symbol-file lipthread.so? Can I do it 
> to load shared libs ?
> When I do this I got "gbd: error initializing thread_db library." error on the 
> target. When I add debug info to it, I see that error is "Incompatible 
> versions of libpthread and libthread_db". But these two libs are from the 
> same libc.
> It looks like this is my second problem. Or it depends on first one and may 
> disappear when first problem is solved?

Are you sure you loaded the right copy?

-- 
Daniel Jacobowitz


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