Bug 673697

Summary: gdb: Linux core files should use linux-thread-db.c
Product: Red Hat Enterprise Linux 5 Reporter: Jeremy Eder <jeder>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7CC: ebachalo, jeder, pbatkowski, pmuller
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.0.1-37.el5 Doc Type: Bug Fix
Doc Text:
A multithreaded program can be dumped into a core file. GDB can load the core file and display the list of its threads. Previously, GDB displayed for the threads found in the core file only their LWP (light-weight process) identifiers, which match the Linux TID (Thread Identifier) values. With this update, GDB initializes the libthread_db threads debugging library when accessing a core file and now displays the pthread_t identifier in addition to the LWP identifier.
Story Points: ---
Clone Of: 673696 Environment:
Last Closed: 2011-07-21 07:58:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 673696    
Bug Blocks:    
Attachments:
Description Flags
7 patches of backports with a testcase. none

Comment 2 Jan Kratochvil 2011-03-30 17:17:26 UTC
Created attachment 488833 [details]
7 patches of backports with a testcase.

QA:
 Running gdb/testsuite/gdb.threads/gcore-thread.exp ...
 PASS: gdb.threads/gcore-thread.exp: successfully compiled posix threads test case
 PASS: gdb.threads/gcore-thread.exp: help gcore
+PASS: gdb.threads/gcore-thread.exp: print pthread_t of main
 PASS: gdb.threads/gcore-thread.exp: thread 1 is running
+PASS: gdb.threads/gcore-thread.exp: print pthread_t of thread1
 PASS: gdb.threads/gcore-thread.exp: thread 2 is running
+PASS: gdb.threads/gcore-thread.exp: print pthread_t of thread2
 PASS: gdb.threads/gcore-thread.exp: save a corefile
 PASS: gdb.threads/gcore-thread.exp: re-load generated corefile
 PASS: gdb.threads/gcore-thread.exp: corefile contains at least two threads
 PASS: gdb.threads/gcore-thread.exp: a corefile thread is executing thread2
 PASS: gdb.threads/gcore-thread.exp: thread2 is current thread in corefile
+PASS: gdb.threads/gcore-thread.exp: main pthread_self found
+PASS: gdb.threads/gcore-thread.exp: thread1 pthread_self found
+PASS: gdb.threads/gcore-thread.exp: thread2 pthread_self found

==> gdb-core-threads-1of7.patch <==
http://sourceware.org/ml/binutils/2010-08/msg00200.html
==> gdb-core-threads-2of7.patch <==
http://sourceware.org/ml/gdb-patches/2009-10/msg00186.html
==> gdb-core-threads-3of7.patch <==
http://sourceware.org/ml/gdb-patches/2009-10/msg00187.html
==> gdb-core-threads-4of7.patch <==
http://sourceware.org/ml/gdb-patches/2010-08/msg00207.html
==> gdb-core-threads-5of7.patch <==
http://sourceware.org/ml/gdb-patches/2010-08/msg00208.html
==> gdb-core-threads-6of7.patch <==
http://sourceware.org/ml/gdb-patches/2010-08/msg00450.html
==> gdb-core-threads-7of7.patch <==
http://sourceware.org/ml/gdb-patches/2011-01/msg00566.html

Comment 4 Eva Kopalova 2011-04-15 12:54:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
A multithreaded program can be dumped into a core file. GDB can load the core file and display the list of its threads. Previously, GDB displayed for the threads found in the core file only their LWP (light-weight process) identifiers, which match the Linux TID (Thread Identifier) values. With this update, GDB initializes the libthread_db threads debugging library when accessing a core file and now displays the pthread_t identifier in addition to the LWP identifier.

Comment 9 errata-xmlrpc 2011-07-21 07:58:30 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1024.html