RE: GDB support
"Howell, David P" <[email protected]>
| Newsgroups | gmane.linux.ngpt.devel |
|---|---|
| Message-ID | <[email protected]> |
One other detail. With the TCore kernel patch all of the threads in a kernel clone thread group are dumped into a single core file that works with gdb and the existing Linuxthreads support, providing a browse only environment to view the active threads and their state at the time of the dump. The TCore patch has been jointly developed by several teams, with Intel and IBM participating. It refines earlier approaches by generating a single core file instead of 1 per thread, attempts to stop the active threads quickly to improve the accuracy of the snapshot, and dumps in a standard way that is compliant to the ELF core dumping and the current implementation of gdb. A version is available for the 2.4.17 kernel and for the 2.5/RH 7.3 kernel that uses the O1 scheduler. A IA32 version has been sent to the LKML, and a IA64 version was also submitted and spawned discussions, see the mail threads. The IA32 version is in the CGL TLT 1.1 kernel. This is marginally useful today for NGPT as the active threads are the native processes, but I have found it useful for debugging several ngpt runtime problems. When the other gdb work is done it will allow per thread debugging as it does for Linuxthreads. Mark Gross or myself can provide the patches if you need to get them. The LKML should also have Mark's patch submissions and updates. Thanks, Dave Howell -----Original Message----- From: Howell, David P Sent: Thursday, May 30, 2002 2:11 PM To: 'Bill Abt'; Stephen Hemminger Cc: [email protected]; Smith, Stanley W Subject: RE: [pthreads-devel] GDB support The implementation involves changes to the libthread_db to properly access the structures exported by the ngpt runtime, changes to the ngpt runtime to add manager thread capabilities for delivering thread events and for the servicing of libthread_db requests, and it appears minimal changes to gdb due to some dependence on the 1-1 thread model used for the Linuxthreads implementation in thread-db.c and lin-lwp.c. The implementation closely follows the Solaris libthread_db architecture, and for this cut aims to provide the support features that are in the standard Linux offerings for Linuxthreads. This includes thread discovery, thread context debugging, and minimal thread events (create, destroy, etc). Future updates will add lock/mutex events and object manipulation. The plan is to provide the debug support as part of the ngpt runtime, and add a libthread_db runtime as the interface between gdb and the ngpt runtime. I have the libthread_db source and build as a subdirectory of the standard source tarball directory build. It will be managed using configure as the rest of the ngpt code and feature selections are. The gdb portion is still a bit up in the air, not sure how best to deliver it short term but longer term the plan would be to contribute it back into the gdb source tarball and have it enabled by it's configure scripts. We can temporarily make it part of the NGPT tarball until it's acceptance into the gdb code base. The code is in debug now and is planned for submission for ngpt-1.9.3. Thanks, Dave Howell -----Original Message----- From: Bill Abt [mailto:[email protected]] Sent: Wednesday, May 29, 2002 6:49 PM To: Stephen Hemminger Cc: [email protected] Subject: Re: [pthreads-devel] GDB support On 05/29/2002 at 03:09:19 PM MST, Stephen Hemminger <[email protected]> wrote: > > Is anyone actively working on better GDB support of NGPT threads. > It shouldn't be too hard since GDB already works on other operating > systems that support N:M thread model. The problem is probably harder if > you have to deal with dynamic detection of both forms of linux thread > libraries. > GDB support is currently planned for release for NGPT 2.0. NGPT 1.9.3 will probably contain the first release of this support. We're doing it via the thread_db libraries. Regards, Bill Abt Senior Software Engineer Next Generation POSIX Threading for Linux IBM Cambridge, MA, USA 02142 Ext: +(00)1 603-673-3440 or +(00)1 617-693-1591 T/L: 253-9938 (Normal) T/L: 693-1591 (Backup) Cell: +(00)1 617-803-7514 [email protected] or [email protected] http://oss.software.ibm.com/developerworks/opensource/pthreads _______________________________________________ pthreads-devel mailing list [email protected] http://www-124.ibm.com/developerworks/oss/mailman/listinfo/pthreads-devel