Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* debugging threads on 64bit GNU/Linux with 32bit debugger?
@ 2007-08-15 19:33 Joel Brobecker
  2007-08-15 19:43 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Brobecker @ 2007-08-15 19:33 UTC (permalink / raw)
  To: gdb

Hello,

I have a feeling this is a familiar question, but I'm still unsure at
the answer after my searches on this list as well as on the general web.

Here is the situation: We're using a gcc/gdb toolset built on a 32bit
x86-linux machine. We're using this toolset on a 64bit machine running
a 64bit GNU/Linux machine. The resulting executable is runing in 32bit
compatibility mode.

Everything seems to be working fine, except that we're having trouble
debugging threaded apps. The thread library used is the NPTL, and the
debugger is reporting to use what seems to be the correct (32bit)
instance of the libthread_db library (the 32bit version in /lib/tls,
not the one in /lib64/tls).

The debugger fails at startup time saying:

        [Thread debugging using libthread_db enabled]
        Cannot find new threads: generic error

The version info of the C library our application is using reads:

    % /lib/tls/libc.so.6
    GNU C Library stable release version 2.3.5 (20050720), by Roland McGrath et
+al.
    Copyright (C) 2005 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE.
    Configured for i686-suse-linux.
    Compiled by GNU CC version 3.3.3 (SuSE Linux).
    Compiled on a Linux 2.6.5 system on 2006-08-09.
    Available extensions:
            GNU libio by Per Bothner
            crypt add-on version 2.1 by Michael Glad and others
            Native POSIX Threads Library by Ulrich Drepper et al
            GNU Libidn by Simon Josefsson
            NoVersion patch for broken glibc 2.0 binaries
            BIND-8.2.3-T5B
            NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
    Thread-local storage support included.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/libc/bugs.html>.

Is our setup supposed to work? Is this a known issue of this
version of the libc (I saw that glibc is now at version 2.6)?
Any hint?

Thanks a lot,
-- 
Joel


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

* Re: debugging threads on 64bit GNU/Linux with 32bit debugger?
  2007-08-15 19:33 debugging threads on 64bit GNU/Linux with 32bit debugger? Joel Brobecker
@ 2007-08-15 19:43 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-08-15 19:43 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb

On Wed, Aug 15, 2007 at 12:36:49PM -0700, Joel Brobecker wrote:
> Here is the situation: We're using a gcc/gdb toolset built on a 32bit
> x86-linux machine. We're using this toolset on a 64bit machine running
> a 64bit GNU/Linux machine. The resulting executable is runing in 32bit
> compatibility mode.
> 
> Everything seems to be working fine, except that we're having trouble
> debugging threaded apps. The thread library used is the NPTL, and the
> debugger is reporting to use what seems to be the correct (32bit)
> instance of the libthread_db library (the 32bit version in /lib/tls,
> not the one in /lib64/tls).
> 
> The debugger fails at startup time saying:
> 
>         [Thread debugging using libthread_db enabled]
>         Cannot find new threads: generic error

The answer is that you need a bunch of kernel patches for this to
work.  You may want to try a very current kernel; I don't know when
the patches were applied, but I believe they have been at this point.
It was probably some point between 2.6.17 and 2.6.22.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2007-08-15 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-15 19:33 debugging threads on 64bit GNU/Linux with 32bit debugger? Joel Brobecker
2007-08-15 19:43 ` Daniel Jacobowitz

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