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: Interesting dwarf-2/shared lib problem.


> > I observed that libdisplay.so has been loaded with a psymtab and that
the
> > code in lookup_symtab() only searches through objects which have a full
> > symtab loaded.  This would seem to be why it's not finding display.c.
I'm
> > supposing that when you do a break on a function, the full symtab is
then
> > loaded.
> >
> > Note also that this goes away if the source is compiled with the stabs+
> > debugging format.  I'm pondering the solution to this.  Is there a way
to
> > force gdb to load the full symbol table for all shared objects?  Or is
there
> > a better way to get around this?
>
> >From lookup_symtab:
>   /* Same search rules as above apply here, but now we look thru the
>      psymtabs.  */
>
>   ps = lookup_partial_symtab (name);
>   if (!ps)
>     return (NULL);
>
> Is that not working?

Ah...interesting.  For the main object, the symtab points to
c:\some_dir\main.c and the symtab->next points to just main.c.  It's the
main.c that gets caught and returned.  In the solib, we only see the
c:\some_lib\display.c so the FILENAME_CMP fails..

So you are correct, lookup_partial_symtab is failing.

cheers,

Kris



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