From: Manoj Iyer <manjo@austin.ibm.com>
To: gdb@sources.redhat.com
Subject: debugging threaded apps. thread ID missing in corefile.
Date: Mon, 06 Jun 2005 22:42:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.58.0506061722330.1519@lazy> (raw)
In-Reply-To: <200506061929.47871.abeach@deepvision.ca>
Regarding debugging threaded apps, gdb does not display the pthread id (ID
returned by pthread_self() ) when reading information from a corefile.
GNU gdb 6.3.50.20050504-cvs
Copyright 2004 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 "powerpc64-unknown-linux-gnu"...Using host
libthread_
db library "/lib/tls/libthread_db.so.1".
Core was generated by `./test'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/tls/libpthread.so.0...done.
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
#0 0x100007c4 in whackthestack () at test.c:76
76 *(int*)0xdeaddead = 0; /* uncomment to test signal
handler *
/
(gdb) thread
[Current thread is 1 (process 9623)]
(gdb) thread 2
[Switching to thread 2 (process 9628)]#0 0x0ff15a64 in
__nanosleep_nocancel ()
from /lib/tls/libc.so.6
(gdb)
Where as when debugging the program live it is able to display the pthread
id (I dont know why the ID is a negative number, could be a bug?).
GNU gdb 6.3.50.20050504-cvs
Copyright 2004 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 "powerpc64-unknown-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) br callme
Breakpoint 1 at 0x10000838: file test.c, line 83.
(gdb) r
Starting program: /home/manjo/projects/zlinux/test64
[Thread debugging using libthread_db enabled]
[New Thread -134270944 (LWP 10491)]
[New Thread -134273824 (LWP 10494)]
[Switching to Thread -134273824 (LWP 10494)]
Breakpoint 1, callme (me=0, i=0) at test.c:83
83 tid = pthread_self();
(gdb) thread 2
[Switching to thread 2 (Thread -134273824 (LWP 10494))]#0 callme (me=0,
i=0)
at test.c:83
83 tid = pthread_self();
So the question really is, is GDB not reading the thread id from core or
the kernel not dumping r2/r13 (ppc) (address of the struct pthread) to the
core?
Thanks
-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cogito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On Mon, 6 Jun 2005, Alvin Beach wrote:
> Hello all,
>
> I don't know why or how, but after I installed gdb-debuginfo-6.3-14 I can now
> debug threaded applications.
>
> I thought I'd send this out in case someone else has run into the same problem
> I did.
>
> Alvin
>
> --
> Please reply to the list.
>
next prev parent reply other threads:[~2005-06-06 22:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-06 22:29 Program no longer exists [SOLVED] Alvin Beach
2005-06-06 22:42 ` Manoj Iyer [this message]
2005-06-07 0:09 ` debugging threaded apps. thread ID missing in corefile Daniel Jacobowitz
2005-06-07 3:46 ` Eli Zaretskii
2005-06-07 13:10 ` Daniel Jacobowitz
2005-06-12 0:47 ` Mark Kettenis
2005-06-07 0:37 ` Program no longer exists [UNSOLVED] Alvin Beach
2005-06-07 18:45 ` Program no longer exists [SOLVED - 95% sure] Alvin Beach
2005-06-17 11:18 ` Program no longer exists [SOLVED - Completely] Alvin Beach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0506061722330.1519@lazy \
--to=manjo@austin.ibm.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox