From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1786 invoked by alias); 28 Jul 2003 20:53:55 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1778 invoked from network); 28 Jul 2003 20:53:54 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 28 Jul 2003 20:53:54 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h6SKrsZ14274 for ; Mon, 28 Jul 2003 16:53:54 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h6SKrsI27377; Mon, 28 Jul 2003 16:53:54 -0400 Received: from localhost.localdomain (vpn50-8.rdu.redhat.com [172.16.50.8]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h6SKrrv29209; Mon, 28 Jul 2003 16:53:53 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h6SKrmJ04740; Mon, 28 Jul 2003 13:53:48 -0700 Date: Mon, 28 Jul 2003 20:53:00 -0000 From: Kevin Buettner Message-Id: <1030728205348.ZM4739@localhost.localdomain> In-Reply-To: Daniel Jacobowitz "RFC: A mode in which gdb avoids libthread_db" (Jul 26, 11:58am) References: <20030726155820.GA1063@nevyn.them.org> To: Daniel Jacobowitz , gdb@sources.redhat.com Subject: Re: RFC: A mode in which gdb avoids libthread_db MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-07/txt/msg00323.txt.bz2 On Jul 26, 11:58am, Daniel Jacobowitz wrote: > Recent Linux kernels (2.5.30 and later; theoretically the latest Red Hat > 2.4.20 kernels also include it, but I observed some badness in testing...) > support some ptrace extensions I designed which make it possible to debug > multi-threaded applications without using libthread_db at all. The only > things we'll lose are: > - Potential high-level information, like mutex status - right now we > don't have this at all on GNU/Linux. > - TLS access - this could be easily fixed by handling each platform's > TLS ABI directly from GDB, and there's a comment to that effect in > GDB's source already. > - TIDs - we'd only have the application's LWP IDs, not the thread IDs > that LinuxThreads/NPTL use. > > Things we'll gain: > - A lot of libthread_db-related bugs would go away. For instance, > the kfail in print-threads.exp, which hits a breakpoint after > LinuxThreads decides the thread has already exited. > - ABI simplicity - this would solve the x86-64/i386 issue, and similar > problems on MIPS. > - Support for debugging clone-based 1-1 threading which doesn't use > libpthread.so. > > Once the pending fork-debugging patch is accepted, most of the machinery > we'd need to do it will be in place, too. Thoughts? Worthwhile? As a settable mode, this definitely sounds worthwhile. Kevin