Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* libpython2.4.so: Cannot load symbols for shared library with separate debuginfo
@ 2007-06-07 13:29 Alejandro Homs
  2007-06-07 13:57 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Homs @ 2007-06-07 13:29 UTC (permalink / raw)
  To: gdb

Hi,

I am trying to debug a Python C++ extension module. I have installed:

python-2.4-14:
  /usr/bin/python2.4              -> stripped
  /usr/lib/libpython.2.4.so.1.0   -> not stripped
python-debug-info-2.4.14:
  /usr/lib/debug/usr/bin/python2.4.debug
  /usr/lib/debug/usr/lib/libpython2.4.so.1.0.debug

I installed the latest gdb-6.6. When I load the core file, gdb reads the
symbols from python2.4.debug, but it does not read the
libpython2.4.so.1.0.debug with the debug information for the shared library.
I guess this is because it finds some symbols already on
libpython2.4.so.1.0, and does not attempt to search the separate debuginfo
file.

I tried with the symbol-file command, but it does not work. 

What can I do to debug libpython2.4.so?

Thanks a lot in advance

Alejandro



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: libpython2.4.so: Cannot load symbols for shared library with  separate debuginfo
  2007-06-07 13:29 libpython2.4.so: Cannot load symbols for shared library with separate debuginfo Alejandro Homs
@ 2007-06-07 13:57 ` Daniel Jacobowitz
  2007-06-07 15:31   ` Alejandro Homs
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-06-07 13:57 UTC (permalink / raw)
  To: Alejandro Homs; +Cc: gdb

On Thu, Jun 07, 2007 at 03:28:38PM +0200, Alejandro Homs wrote:
> Hi,
> 
> I am trying to debug a Python C++ extension module. I have installed:
> 
> python-2.4-14:
>   /usr/bin/python2.4              -> stripped
>   /usr/lib/libpython.2.4.so.1.0   -> not stripped
> python-debug-info-2.4.14:
>   /usr/lib/debug/usr/bin/python2.4.debug
>   /usr/lib/debug/usr/lib/libpython2.4.so.1.0.debug
> 
> I installed the latest gdb-6.6. When I load the core file, gdb reads the
> symbols from python2.4.debug, but it does not read the
> libpython2.4.so.1.0.debug with the debug information for the shared library.
> I guess this is because it finds some symbols already on
> libpython2.4.so.1.0, and does not attempt to search the separate debuginfo
> file.

It should always try to load the separate debug file.  Is
debug-file-directory set to /usr/lib/debug, and is there a
.gnu_debuglink section in libpython.2.4.so.1.0?  You may have
to debug GDB to find out what it thinks it's doing.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: libpython2.4.so: Cannot load symbols for shared library with  separate debuginfo
  2007-06-07 13:57 ` Daniel Jacobowitz
@ 2007-06-07 15:31   ` Alejandro Homs
  2007-06-07 15:39     ` 'Daniel Jacobowitz'
  2007-06-07 15:59     ` Andreas Schwab
  0 siblings, 2 replies; 6+ messages in thread
From: Alejandro Homs @ 2007-06-07 15:31 UTC (permalink / raw)
  To: 'Daniel Jacobowitz'; +Cc: gdb

Thanks a lot for your fast response!

> It should always try to load the separate debug file.  Is
> debug-file-directory set to /usr/lib/debug, and is there a
> .gnu_debuglink section in libpython.2.4.so.1.0?  You may have
> to debug GDB to find out what it thinks it's doing.

You are right, the debug-file-directory is pointing to /usr/lib/debug, but
there is no .gnu_debuglink section in libpython.2.4.so.1.0.
I am obliged to generate the .gnu_debuglink section? 

I did it already with objcopy and it works!! But I had to modify
/usr/lib/libpython2.4.so.1.0 ...

Thanks again for your help!

Alejandro


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: libpython2.4.so: Cannot load symbols for shared library with  separate debuginfo
  2007-06-07 15:31   ` Alejandro Homs
@ 2007-06-07 15:39     ` 'Daniel Jacobowitz'
  2007-06-07 15:59     ` Andreas Schwab
  1 sibling, 0 replies; 6+ messages in thread
From: 'Daniel Jacobowitz' @ 2007-06-07 15:39 UTC (permalink / raw)
  To: Alejandro Homs; +Cc: gdb

On Thu, Jun 07, 2007 at 05:31:11PM +0200, Alejandro Homs wrote:
> Thanks a lot for your fast response!
> 
> > It should always try to load the separate debug file.  Is
> > debug-file-directory set to /usr/lib/debug, and is there a
> > .gnu_debuglink section in libpython.2.4.so.1.0?  You may have
> > to debug GDB to find out what it thinks it's doing.
> 
> You are right, the debug-file-directory is pointing to /usr/lib/debug, but
> there is no .gnu_debuglink section in libpython.2.4.so.1.0.
> I am obliged to generate the .gnu_debuglink section? 

Yes; to use a separate debug file you need both --only-keep-debug and
--add-gnu-debuglink.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: libpython2.4.so: Cannot load symbols for shared library with  separate debuginfo
  2007-06-07 15:31   ` Alejandro Homs
  2007-06-07 15:39     ` 'Daniel Jacobowitz'
@ 2007-06-07 15:59     ` Andreas Schwab
  2007-06-07 17:48       ` Alejandro Homs
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2007-06-07 15:59 UTC (permalink / raw)
  To: Alejandro Homs; +Cc: 'Daniel Jacobowitz', gdb

"Alejandro Homs" <ahoms@cells.es> writes:

> Thanks a lot for your fast response!
>
>> It should always try to load the separate debug file.  Is
>> debug-file-directory set to /usr/lib/debug, and is there a
>> .gnu_debuglink section in libpython.2.4.so.1.0?  You may have
>> to debug GDB to find out what it thinks it's doing.
>
> You are right, the debug-file-directory is pointing to /usr/lib/debug, but
> there is no .gnu_debuglink section in libpython.2.4.so.1.0.
> I am obliged to generate the .gnu_debuglink section? 

If there is no debuglink section then the debug info file most likely
does not belong to this library.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: libpython2.4.so: Cannot load symbols for shared library with  separate debuginfo
  2007-06-07 15:59     ` Andreas Schwab
@ 2007-06-07 17:48       ` Alejandro Homs
  0 siblings, 0 replies; 6+ messages in thread
From: Alejandro Homs @ 2007-06-07 17:48 UTC (permalink / raw)
  To: 'Andreas Schwab'; +Cc: 'Daniel Jacobowitz', gdb

> >> It should always try to load the separate debug file.  Is
> >> debug-file-directory set to /usr/lib/debug, and is there a
> >> .gnu_debuglink section in libpython.2.4.so.1.0?  You may have
> >> to debug GDB to find out what it thinks it's doing.
> >
> > You are right, the debug-file-directory is pointing to /usr/lib/debug,
> but
> > there is no .gnu_debuglink section in libpython.2.4.so.1.0.
> > I am obliged to generate the .gnu_debuglink section?
> 
> If there is no debuglink section then the debug info file most likely
> does not belong to this library.

That's a very strange thing. All the other libraries in the same package
have the .gnu_debuglink section. And the debuginfo package was built with
the same timestamp ... I don't know if this was removed intentionally by
SuSE ... I do not have the SRPM of that package, so I will check with recent
package versions.

Anyway, as I said in my previous mail, objcopy did the job, and it works!
Thanks

Alejandro


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-07 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-07 13:29 libpython2.4.so: Cannot load symbols for shared library with separate debuginfo Alejandro Homs
2007-06-07 13:57 ` Daniel Jacobowitz
2007-06-07 15:31   ` Alejandro Homs
2007-06-07 15:39     ` 'Daniel Jacobowitz'
2007-06-07 15:59     ` Andreas Schwab
2007-06-07 17:48       ` Alejandro Homs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox