Package: gdb
Version: 6.6.dfsg-1
Severity: important

When I try to debug a multithread application, I get a "general
error" as it is showed below:
===
~$gdb ./hello 
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) start
Breakpoint 1 at 0x80483a5: file hello.c, line 5.
Starting program: /home/dpotapov/hello 
warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at 
ffffe0b4
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find user-level thread for LWP 2518: generic error
===

I have tried to use both 'stable' and 'unstable' versions of gdb with
the same result. I suspect that the problem has something to do with
-amd64 kernel (linux-image-2.6-amd64_2.6.18+6_i386.deb), because at the
address 0xffffe000 (which mentioned in the above warning) is the address
of linux-gate.so.1, which is a virtual DSO provided by the kernel.
===
$ldd ./hello
        linux-gate.so.1 =>  (0xffffe000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xf7ecb000)
        libc.so.6 => /lib/tls/libc.so.6 (0xf7d99000)
        /lib/ld-linux.so.2 (0xf7ef4000)
===

The error happens only when libpthread is linked to the program,
but the warning about system-supplied DSO is always showed up.

Also if the debug version of libthread_db is used then there is
no error, but only the warning.
===
~$LD_LIBRARY_PATH=/usr/lib/debug gdb ./hello 
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/usr/lib/debug/libthread_db.so.1".
(gdb) start
Breakpoint 1 at 0x80483a5: file hello.c, line 5.
Starting program: /home/dpotapov/hello 
warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at 
ffffe0b4
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 2542)]
[Switching to Thread 16384 (LWP 2542)]
main () at hello.c:5
5               printf("Hello world\n");
===

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)

Versions of packages gdb depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libncurses5                 5.5-5        Shared libraries for terminal hand
ii  libreadline5                5.2-2        GNU readline and history libraries

gdb recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to