[beagleboard] unable to do multi-threaded debugging

Hi all -

I'm running the Sakoman gnome-r11 release of Angstrom. I am debugging
a large mutli-threaded program, and having no luck with gdb.

On starting, gdb always compains, usually multiple times:

"warning: unable to find libthread_db matching inferior's thread
library, thread debugging will not be available"

And, sure enough it doesn't seem to be. I can't set breakpoints, and
since my main program sets things up and then sits in an event loop,
leaving all the work to other threads, I can't debug.

Is this message about libthread_db apropos to my issue? If so, any
ideas on how I fix this so I can use gdb?

thanks!

CJ wrote:

Hi all -

I'm running the Sakoman gnome-r11 release of Angstrom. I am debugging
a large mutli-threaded program, and having no luck with gdb.

On starting, gdb always compains, usually multiple times:

"warning: unable to find libthread_db matching inferior's thread
library, thread debugging will not be available"

And, sure enough it doesn't seem to be. I can't set breakpoints, and
since my main program sets things up and then sits in an event loop,
leaving all the work to other threads, I can't debug.

Is this message about libthread_db apropos to my issue? If so, any
ideas on how I fix this so I can use gdb?

yes, you need to have that lib on your system. and it must NOT be stripped
afaik.

You need the lib and the debugging symbols:

opkg update ; opkg install libthread-db1 glibc-dbg

regards,

Koen

that's what I was hoping - glibc-dbg is installed ok, but here's what
happens with libthread_db1:

root@omap3:~# opkg update;opkg install libthread_db1
Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/base/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/base/Packages.gz
Updated list of available packages in /var/lib/opkg/base
Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/debug/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/debug/Packages.gz
Updated list of available packages in /var/lib/opkg/debug
Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/gstreamer/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/gstreamer/Packages.gz
Updated list of available packages in /var/lib/opkg/gstreamer
Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc//all/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc//all/Packages.gz
Updated list of available packages in /var/lib/opkg/no-arch
Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/machine/omap3/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/machine/omap3/Packages.gz
Updated list of available packages in /var/lib/opkg/omap3
Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/perl/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/perl/Packages.gz
Updated list of available packages in /var/lib/opkg/perl
Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Updated list of available packages in /var/lib/opkg/python
Collected errors:
* Cannot find package libthread_db1.
root@omap3:~#

CJ wrote:

Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Updated list of available packages in /var/lib/opkg/python
Collected errors:
  * Cannot find package libthread_db1.

and the 1 is not a typo?

CJ wrote:

Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Updated list of available packages in /var/lib/opkg/python
Collected errors:
* Cannot find package libthread_db1.

and the 1 is not a typo?

No, the 1 isn't the typo, but I said:

"opkg update ; opkg install libthread-db1 glibc-dbg"

and CJ did

"opkg update ; opkg install libthread_db1 glibc-dbg"

So the underscore is the typo :slight_smile:

regards,

Koen

Koen Kooi wrote:

CJ wrote:

Downloading http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Inflating http://www.sakoman.com/feeds/unstable/ipk/glibc/armv7a/python/Packages.gz
Updated list of available packages in /var/lib/opkg/python
Collected errors:
  * Cannot find package libthread_db1.

and the 1 is not a typo?

No, the 1 isn't the typo, but I said:

"opkg update ; opkg install libthread-db1 glibc-dbg"

and CJ did

"opkg update ; opkg install libthread_db1 glibc-dbg"

So the underscore is the typo :slight_smile:

I said there was tzpo :slight_smile:

Hi Koen

I am having a similar problem, however when I install glibc-dbg and
libthread-db1 the error changes to:

(gdb) run
warning: no loadable sections found in added symbol-file /lib/.debug/
ld-2.9.so
warning: no loadable sections found in added symbol-file /usr/
lib/.debug/libdbus-glib-1.so.2.1.0
warning: no loadable sections found in added symbol-file /usr/
lib/.debug/libgobject-2.0.so.0.2400.0
warning: no loadable sections found in added symbol-file /usr/
lib/.debug/libglib-2.0.so.0.2400.0
warning: no loadable sections found in added symbol-file /usr/
lib/.debug/libdbus-1.so.3.4.0
[Thread debugging using libthread_db enabled]
warning: no loadable sections found in added symbol-file /usr/
lib/.debug/libgthread-2.0.so.0.2400.0
Cannot find new threads: generic error

Any ideas what might be going on here?

Cheers

Matt