Missing debug info
I'm trying to debug some code which uses the openssl library, built from the Poky mainline. For some reason (not obvious to me), there is no debug info for this library, which makes GDB pretty useless :-(
(gdb) info sharedlibrary
From To Syms Read Shared Object Library 0x40077790 0x4008f60c Yes /tmp/cobra_root/lib/ld-linux.so.3 0x401abf80 0x401d57d8 Yes (*) /tmp/cobra_root/usr/lib/libssl.so.0.9.8 0x40225548 0x402cfbfc Yes (*) /tmp/cobra_root/usr/lib/libcrypto.so.0.9.8 0x400f28f8 0x4010cf90 Yes /tmp/cobra_root/usr/lib/libpcap.so.1 0x40326340 0x4040e8d8 Yes /tmp/cobra_root/lib/libc.so.6 0x401278fc 0x40128614 Yes /tmp/cobra_root/lib/libdl.so.2
(*): Shared library is missing debugging information.
Any idea why these libraries don't have debg info? how to get it? Rebuilding that library with printf() is pretty tedious...
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 12 lines · Gary Thomas
I'm trying to debug some code which uses the openssl library, built from the Poky mainline. For some reason (not obvious to me), there is no debug info for this library, which makes GDB pretty useless :-(
(gdb) info sharedlibrary
From To Syms Read Shared Object Library0x40077790 0x4008f60c Yes /tmp/cobra_root/lib/ld-linux.so.3 0x401abf80 0x401d57d8 Yes (*) /tmp/cobra_root/usr/lib/libssl.so.0.9.8 0x40225548 0x402cfbfc Yes (*) /tmp/cobra_root/usr/lib/libcrypto.so.0.9.8 0x400f28f8 0x4010cf90 Yes /tmp/cobra_root/usr/lib/libpcap.so.1 0x40326340 0x4040e8d8 Yes /tmp/cobra_root/lib/libc.so.6 0x401278fc 0x40128614 Yes /tmp/cobra_root/lib/libdl.so.2
Quoted 7 lines
(*): Shared library is missing debugging information.
Any idea why these libraries don't have debg info? how to get it? Rebuilding that library with
printf()is pretty tedious...Thanks
Do the libraries in question have corresponding -dbg package that are empty? Or is there stuff in there, it's just incomplete?
What I'm trying to understand is were these items stripped during the recipe build, or when they're supposed to be by the package.bbclass into the regular and dbg packages.
--Mark
Quoted 21 lines · Mark Hatle
Quoted 12 lines · Gary Thomas
I'm trying to debug some code which uses the openssl library, built from the Poky mainline. For some reason (not obvious to me), there is no debug info for this library, which makes GDB pretty useless :-(
(gdb) info sharedlibrary
From To Syms Read Shared Object Library0x40077790 0x4008f60c Yes /tmp/cobra_root/lib/ld-linux.so.3 0x401abf80 0x401d57d8 Yes (*) /tmp/cobra_root/usr/lib/libssl.so.0.9.8 0x40225548 0x402cfbfc Yes (*) /tmp/cobra_root/usr/lib/libcrypto.so.0.9.8 0x400f28f8 0x4010cf90 Yes /tmp/cobra_root/usr/lib/libpcap.so.1 0x40326340 0x4040e8d8 Yes /tmp/cobra_root/lib/libc.so.6 0x401278fc 0x40128614 Yes /tmp/cobra_root/lib/libdl.so.2Quoted 7 lines
(*): Shared library is missing debugging information.
Any idea why these libraries don't have debg info? how to get it? Rebuilding that library with
printf()is pretty tedious...Thanks
Quoted 6 lines
Do the libraries in question have corresponding -dbg package that are empty? Or is there stuff in there, it's just incomplete?
What I'm trying to understand is were these items stripped during the recipe build, or when they're supposed to be by the package.bbclass into the regular and dbg packages.
Ah, interesting. The openssl package does have a -dbg version, but not for libopenssl nor libcrypto (which were built by the same source package). Any ideas how/why that happened? I didn't see any magic in the build arguments, but it's a pretty complex package so I might have missed something.
Just to see what I could learn from this, I tried to install openssl-dbg and got this:
Downloading file:/home/local/p60_poky/tmp/deploy/ipk/armv7a/openssl-dbg_0.9.8p-r3_armv7a.ipk.
openssl-dbg: unsatisfied recommendation for libcrypto-dbg
openssl-dbg: unsatisfied recommendation for libssl-dbg
Installing openssl (0.9.8p-r3) to root...
Downloading file:/home/local/p60_poky/tmp/deploy/ipk/armv7a/openssl_0.9.8p-r3_armv7a.ipk. Configuring openssl.
Configuring openssl-dbg.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 12 lines · Gary Thomas
I'm trying to debug some code which uses the openssl library, built from the Poky mainline. For some reason (not obvious to me), there is no debug info for this library, which makes GDB pretty useless :-(
(gdb) info sharedlibrary
From To Syms Read Shared Object Library0x40077790 0x4008f60c Yes /tmp/cobra_root/lib/ld-linux.so.3 0x401abf80 0x401d57d8 Yes (*) /tmp/cobra_root/usr/lib/libssl.so.0.9.8 0x40225548 0x402cfbfc Yes (*) /tmp/cobra_root/usr/lib/libcrypto.so.0.9.8 0x400f28f8 0x4010cf90 Yes /tmp/cobra_root/usr/lib/libpcap.so.1 0x40326340 0x4040e8d8 Yes /tmp/cobra_root/lib/libc.so.6 0x401278fc 0x40128614 Yes /tmp/cobra_root/lib/libdl.so.2
Quoted 4 lines
(*): Shared library is missing debugging information.
Any idea why these libraries don't have debg info? how to get it? Rebuilding that library with
printf()is pretty tedious...
Looking at some builds here, openssl seems to build debug symbols in the usual way. Did you have the appropriate -dbg package installed? Are there debug symbols in /tmp/cobra_root/usr/lib/.debug/libssl.so.0.9.8 ? Do the files list the same debug checksum?
Cheers,
Richard
Quoted 15 lines · Richard Purdie
Quoted 14 lines · Gary Thomas
I'm trying to debug some code which uses the openssl library, built from the Poky mainline. For some reason (not obvious to me), there is no debug info for this library, which makes GDB pretty useless :-(
(gdb) info sharedlibrary
From To Syms Read Shared Object Library0x40077790 0x4008f60c Yes /tmp/cobra_root/lib/ld-linux.so.3 0x401abf80 0x401d57d8 Yes (*) /tmp/cobra_root/usr/lib/libssl.so.0.9.8 0x40225548 0x402cfbfc Yes (*) /tmp/cobra_root/usr/lib/libcrypto.so.0.9.8 0x400f28f8 0x4010cf90 Yes /tmp/cobra_root/usr/lib/libpcap.so.1 0x40326340 0x4040e8d8 Yes /tmp/cobra_root/lib/libc.so.6 0x401278fc 0x40128614 Yes /tmp/cobra_root/lib/libdl.so.2(*): Shared library is missing debugging information.
Quoted 6 lines
Quoted 2 lines
Any idea why these libraries don't have debg info? how to get it? Rebuilding that library with
printf()is pretty tedious...Looking at some builds here, openssl seems to build debug symbols in the usual way. Did you have the appropriate -dbg package installed? Are there debug symbols in
/tmp/cobra_root/usr/lib/.debug/libssl.so.0.9.8?
[gthomas@titan p60_poky]$ ls /tmp/cobra_root/usr/lib/.debug -l total 5496
lrwxrwxrwx 1 gthomas gthomas 18 Apr 3 14:10 libcrypto.so -> libcrypto.so.0.9.8
-rwxrwxr-x 1 gthomas gthomas 4062169 Mar 30 07:37 libcrypto.so.0.9.8
lrwxrwxrwx 1 gthomas gthomas 16 Apr 3 08:35 libpcap.so.1 -> libpcap.so.1.1.1
-rwxrwxr-x 1 gthomas gthomas 340999 Mar 30 11:12 libpcap.so.1.1.1
lrwxrwxrwx 1 gthomas gthomas 15 Apr 3 14:10 libssl.so -> libssl.so.0.9.8
-rwxrwxr-x 1 gthomas gthomas 1217365 Mar 30 07:37 libssl.so.0.9.8
Quoted 1 line
Do the files list the same debug checksum?
Not sure what this means, sorry.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 25 lines · Gary Thomas
Quoted 24 lines · Mark Hatle
Quoted 12 lines · Gary Thomas
I'm trying to debug some code which uses the openssl library, built from the Poky mainline. For some reason (not obvious to me), there is no debug info for this library, which makes GDB pretty useless :-(
(gdb) info sharedlibrary
From To Syms Read Shared Object Library0x40077790 0x4008f60c Yes /tmp/cobra_root/lib/ld-linux.so.3 0x401abf80 0x401d57d8 Yes (*) /tmp/cobra_root/usr/lib/libssl.so.0.9.8 0x40225548 0x402cfbfc Yes (*) /tmp/cobra_root/usr/lib/libcrypto.so.0.9.8 0x400f28f8 0x4010cf90 Yes /tmp/cobra_root/usr/lib/libpcap.so.1 0x40326340 0x4040e8d8 Yes /tmp/cobra_root/lib/libc.so.6 0x401278fc 0x40128614 Yes /tmp/cobra_root/lib/libdl.so.2Quoted 7 lines
(*): Shared library is missing debugging information.
Any idea why these libraries don't have debg info? how to get it? Rebuilding that library with
printf()is pretty tedious...Thanks
Do the libraries in question have corresponding -dbg package that are empty? Or is there stuff in there, it's just incomplete?
Quoted 9 lines
Quoted 3 lines
What I'm trying to understand is were these items stripped during the recipe build, or when they're supposed to be by the package.bbclass into the regular and dbg packages.
Ah, interesting. The openssl package does have a -dbg version, but not for libopenssl nor libcrypto (which were built by the same source package). Any ideas how/why that happened? I didn't see any magic in the build arguments, but it's a pretty complex package so I might have missed something.
The dbg package is only provided for the corresponding source recipe. So if libssl, libcrypto both come from the OpenSSL recipe, then installing the openssl-dbg package is the right answer.
Quoted 5 lines
Just to see what I could learn from this, I tried to install openssl-dbg and got this:
Downloading file:/home/local/p60_poky/tmp/deploy/ipk/armv7a/openssl-dbg_0.9.8p-r3_armv7a.ipk.
openssl-dbg: unsatisfied recommendation for libcrypto-dbg
openssl-dbg: unsatisfied recommendation for libssl-dbg
This is a common problem that we'll need to address in a future release, but the dependency can be safely ignored. There is no libcrypto/libssl dbg specific package.
Quoted 4 lines
Installing openssl (0.9.8p-r3) to root...
Downloading file:/home/local/p60_poky/tmp/deploy/ipk/armv7a/openssl_0.9.8p-r3_armv7a.ipk. Configuring openssl.
Configuring openssl-dbg.
If the openssl-dbg is installed then the corresponding files in the /usr/lib/.debug and /usr/src/debug should now exist and allow debugging on the target.
When you start up gdb, you should see a message that it is loading the debug symbols.
Quoted 5 lines
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 51 lines · Mark
Quoted 25 lines · Gary Thomas
Quoted 24 lines · Mark Hatle
Quoted 12 lines · Gary Thomas
I'm trying to debug some code which uses the openssl library, built from the Poky mainline. For some reason (not obvious to me), there is no debug info for this library, which makes GDB pretty useless :-(
(gdb) info sharedlibrary
From To Syms Read Shared Object Library0x40077790 0x4008f60c Yes /tmp/cobra_root/lib/ld-linux.so.3 0x401abf80 0x401d57d8 Yes (*) /tmp/cobra_root/usr/lib/libssl.so.0.9.8 0x40225548 0x402cfbfc Yes (*) /tmp/cobra_root/usr/lib/libcrypto.so.0.9.8 0x400f28f8 0x4010cf90 Yes /tmp/cobra_root/usr/lib/libpcap.so.1 0x40326340 0x4040e8d8 Yes /tmp/cobra_root/lib/libc.so.6 0x401278fc 0x40128614 Yes /tmp/cobra_root/lib/libdl.so.2Quoted 7 lines
(*): Shared library is missing debugging information.
Any idea why these libraries don't have debg info? how to get it? Rebuilding that library with
printf()is pretty tedious...Thanks
Do the libraries in question have corresponding -dbg package that are empty? Or is there stuff in there, it's just incomplete?
Quoted 9 lines
Quoted 3 lines
What I'm trying to understand is were these items stripped during the recipe build, or when they're supposed to be by the package.bbclass into the regular and dbg packages.
Ah, interesting. The openssl package does have a -dbg version, but not for libopenssl nor libcrypto (which were built by the same source package). Any ideas how/why that happened? I didn't see any magic in the build arguments, but it's a pretty complex package so I might have missed something.
The dbg package is only provided for the corresponding source recipe. So if libssl, libcrypto both come from the OpenSSL recipe, then installing the openssl-dbg package is the right answer.
Quoted 5 lines
Just to see what I could learn from this, I tried to install openssl-dbg and got this:
Downloading file:/home/local/p60_poky/tmp/deploy/ipk/armv7a/openssl-dbg_0.9.8p-r3_armv7a.ipk.
openssl-dbg: unsatisfied recommendation for libcrypto-dbg
openssl-dbg: unsatisfied recommendation for libssl-dbgThis is a common problem that we'll need to address in a future release, but the dependency can be safely ignored. There is no libcrypto/libssl dbg specific package.
Quoted 8 lines
Quoted 4 lines
Installing openssl (0.9.8p-r3) to root...
Downloading file:/home/local/p60_poky/tmp/deploy/ipk/armv7a/openssl_0.9.8p-r3_armv7a.ipk. Configuring openssl.
Configuring openssl-dbg.If the openssl-dbg is installed then the corresponding files in the
/usr/lib/.debugand/usr/src/debugshould now exist and allow debugging on the target.When you start up gdb, you should see a message that it is loading the debug symbols.
Thanks for the explanation. Perhaps this should be filed as a bug [enhancement]?
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------