Bug 673696 - gdb: Linux core files should use linux-thread-db.c
Summary: gdb: Linux core files should use linux-thread-db.c
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gdb
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact: qe-baseos-tools
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 673697 697900
TreeView+ depends on / blocked
 
Reported: 2011-01-29 21:19 UTC by Jeremy Eder
Modified: 2018-11-14 13:26 UTC (History)
4 users (show)

(edit)
Multithreaded program can be dumped into a core file. GDB can load core files and display the list of their threads. Previously, GDB displayed only the LWP (light-weight process) identifier for threads found in the core file.  With this update, GDB initializes the libthread_db threads debugging library even while accessing a core file and GDB displays for each thread besides LWP also the pthread_t identifier.
Clone Of:
: 673697 697900 (view as bug list)
(edit)
Last Closed: 2011-05-19 13:48:41 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0638 normal SHIPPED_LIVE gdb bug fix and enhancement update 2011-05-18 17:55:45 UTC

Description Jeremy Eder 2011-01-29 21:19:24 UTC
This is upstream gdb bz 8210:
http://sourceware.org/bugzilla/show_bug.cgi?id=8210


Description of problem:
Core dumps have no pthread id on them in gdb on RHEL5 and 6.


When looking on a core dump:
(gdb) info threads
  22 process 18110  0x0000003464eccfc2 in select () from /lib64/libc.so.6
  21 process 18111  0x0000003464ed4108 in epoll_wait () from /lib64/libc.so.6

-----
 
When attaching to a running process all is good:
(gdb) info threads
  22 Thread 0x42337940 (LWP 29132)  0x0000003464eccfc2 in select () from /lib64/libc.so.6
  21 Thread 0x42d38940 (LWP 29133)  0x0000003464ed4108 in epoll_wait () from /lib64/libc.so.6

Comment 2 Jan Kratochvil 2011-01-30 19:40:29 UTC
Checked in: gdb-7.2-39.fc14

New testcases:
+PASS: gdb.threads/gcore-thread.exp: print pthread_t of main
+PASS: gdb.threads/gcore-thread.exp: print pthread_t of thread1
+PASS: gdb.threads/gcore-thread.exp: print pthread_t of thread2
+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

Comment 5 Eva Kopalova 2011-04-05 16:01:01 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:
GDB did not display pthread_t for threads found in the core. GDB now displays pthread_t for the threads.

Comment 6 Eva Kopalova 2011-04-08 16:15:36 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-GDB did not display pthread_t for threads found in the core. GDB now displays pthread_t for the threads.+Multithreaded program can be dumped into a core file. GDB can load core files and display the list of their threads. Previously, GDB displayed only the LWP (light-weight process) identifier for threads found in the core file.  With this update, GDB initializes the libthread_db threads debugging library even while accessing a core file and GDB displays for each thread besides LWP also the pthread_t identifier.

Comment 12 errata-xmlrpc 2011-05-19 13:48:41 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-0638.html


Note You need to log in before you can comment on or make changes to this bug.