From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8758 invoked by alias); 6 Oct 2005 15:23:03 -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 8726 invoked by uid 22791); 6 Oct 2005 15:23:00 -0000 Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 06 Oct 2005 15:23:00 +0000 Received: from snyder (64-142-13-156.dsl.static.sonic.net [64.142.13.156]) by b.mail.sonic.net (8.13.3/8.13.3) with SMTP id j96FMwiU024147 for ; Thu, 6 Oct 2005 08:22:58 -0700 Message-ID: <003101c5ca89$66229580$677ba8c0@sonic.net> Reply-To: "Michael Snyder" From: "Michael Snyder" To: Subject: Re: [RFC] named thread support Date: Thu, 06 Oct 2005 15:23:00 -0000 X-SW-Source: 2005-10/txt/msg00029.txt.bz2 Daniel Jacobowitz wrote: >On Tue, Oct 04, 2005 at 12:40:22PM -0400, Kris Warkentin wrote: >> Would it be of interest to have a generic 'set threadname ' >> that called a target_set_threadname()? I ask because we're implementing >> named threads in our kernel but I don't know if many other systems >> support this. I can always add it to our backend but if someone else >> might use it in the future, I can make it general. > > So by named thread support, you mean that the application can register > the name of the thread with the kernel? And you want GDB to be able to > set thread names? > > I recommend doing this in your backend, since I don't know any other > gdb-supported system with a similar feature. On the other hand, this is not the first time I have heard the idea put forth. Evidently at least some people want to be able to associate a name with a thread. For the sake of discussion, what about this? Split it into a generic part and a target-specific part. 1) The generic part would be to add a name field to gdb's thread struct, with appropriate UI for manipulating and displaying it. The "thread" and "thread apply" commands would be enhanced to accept a name as well as a number. 2) Target-specific part -- sends the gdb-selected names to the target, accepts target-selected names from the target and adds them to gdb thread database. Part 1 could be used by everybody, independently of whether their target implements part 2. Michael