From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9955 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: pthread set name on MIPs Date: Tue, 26 Apr 2016 20:34:32 -0400 Message-ID: <20160427003432.GS21636@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1461717289 4566 80.91.229.3 (27 Apr 2016 00:34:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 00:34:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9968-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 27 02:34:48 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1avDRI-0007u8-Ga for gllmg-musl@m.gmane.org; Wed, 27 Apr 2016 02:34:48 +0200 Original-Received: (qmail 25665 invoked by uid 550); 27 Apr 2016 00:34:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 25647 invoked from network); 27 Apr 2016 00:34:46 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9955 Archived-At: On Tue, Apr 26, 2016 at 05:22:51PM -0700, Ward Willats wrote: > Hello. > > We'd like to set the thread name on pthreads on our MIPS/Linux/MUSL > device. > > pthread_setname_no() does not seem to be supported, and prctl( > PR_SET_NAME ) works, but the thread names don't show up in > GDB....(well, gdbserver) > > Is there a trick? Or is this unsupported? This shouldn't be mips-specific. As you said we don't have pthread_setname_np right now (although I don't think there's any major objection to adding it) but the prctl should be equivalent. If gdb doesn't show that, I'm guessing it gets the name it shows from somewhere else, which might or might not be easy to make work. If it depends on libthread_db you're out of luck unless we find a nice way to get gdb to find the names without that. Anyone else have ideas? Rich