This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
threads/1871: Cannot access threads at all in x86_64-linux
- From: jkohen at users dot sourceforge dot net
- To: gdb-gnats at sources dot redhat dot com
- Date: 17 Feb 2005 23:33:43 -0000
- Subject: threads/1871: Cannot access threads at all in x86_64-linux
- Reply-to: jkohen at users dot sourceforge dot net
>Number: 1871
>Category: threads
>Synopsis: Cannot access threads at all in x86_64-linux
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 17 23:38:01 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator: jkohen@users.sourceforge.net
>Release: GNU gdb 6.3-debian
>Organization:
>Environment:
Linux 2.6.10-ck5/x86_64, 64-bit kernel compiled with gcc-3.4.x and with pure 64-bit userland compiled with gcc-3.4.x and gcc-4.0-preX.
Glibc 2.3.2.
It's a current Debian-AMD64/gcc-3.4 distribution.
>Description:
GDB cannot show me thread information or set breakpoints on threads beyond #0. See the attached test program and gdb log.
The program runs fine from inside GDB and from the shell.
>How-To-Repeat:
The GCC used to compile the program is gcc (GCC) 3.4.4 20050203 (prerelease) (Debian 3.4.3-9.0.0.1.gcc4) with the following command line:
gcc -lpthread -ggdb -Wall -ofoo foo.c
and the following produces the same results:
gcc -O0 -lpthread -ggdb -Wall -ofoo foo.c
Note that "info threads" gives an empty list even if issued before the thread returns.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="foo.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.c"
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxwdGhyZWFkLmg+Cgp2b2lkKgp0KHZvaWQgKmFy
ZykKewoJcHJpbnRmKCJIZWxsbyB0aHJlYWRlZCB3b3JsZFxuIik7CgoJcmV0dXJuIE5VTEw7Cn0K
CmludAptYWluKHZvaWQpCnsKCXB0aHJlYWRfdCBwdDsKCglwdGhyZWFkX2NyZWF0ZSgmcHQsIE5V
TEwsIHQsIE5VTEwpOwoKCXByaW50ZigiSGVsbG8gd29ybGRcbiIpOwoKCXB0aHJlYWRfam9pbihw
dCwgTlVMTCk7CgoJcmV0dXJuIDA7Cn0K