Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I debug LinuxThreads program using gdb?

debug gdb LinuxThreads program
0
10 Posted

Can I debug LinuxThreads program using gdb?

0

Yes, but not with the stock gdb 4.17. You need a specially patched version of gdb 4.17 developed by Eric Paire and colleages at The Open Group, Grenoble. The patches against gdb 4.17 are available at http://pauillac.inria.fr/~xleroy/linuxthreads/gdb-4.17-debug-threads.patch.gz. H.J.Lu also develops patches for gdb 4.17 that include thread support and more; those are available at ftp://ftp.valinux.com/pub/support/hjl/gdb/. More recent versions of gdb seem to include LinuxThreads support. Some Linux distributions provide an already-patched version of gdb; others don’t. For instance, the gdb in RedHat 5.2 and RedHat 6.2 is thread-aware, but apparently not the one in RedHat 6.0. Just ask (politely) the makers of your Linux distributions to please make sure that they apply the correct patches to gdb.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123