Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2010 12:46:23 -0500
From:      Ed Maste <emaste@freebsd.org>
To:        Attilio Rao <attilio@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r215679 - in head: contrib/binutils/bfd contrib/binutils/binutils contrib/binutils/include/elf contrib/file contrib/gdb/gdb gnu/usr.bin/gdb/libgdb sys/compat/freebsd32 sys/kern sys/sys ...
Message-ID:  <20101122174623.GA93150@sandvine.com>
In-Reply-To: <201011221442.oAMEgD9j094882@svn.freebsd.org>
References:  <201011221442.oAMEgD9j094882@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 22, 2010 at 02:42:13PM +0000, Attilio Rao wrote:

> Author: attilio
> Date: Mon Nov 22 14:42:13 2010
> New Revision: 215679
> URL: http://svn.freebsd.org/changeset/base/215679
> 
> Log:
>   Add the ability for GDB to printout the thread name along with other
>   thread specific informations.

This change is particularly useful if one has a heavily threaded app
that uses pthread_set_name_np() to set its thread names.

This is an example of the output you get with stock GDB:

(gdb) info threads
  12 Thread 2a4041c0 (LWP 100184)  0x29e91fe3 in memset ()
  11 Thread 2a404700 (LWP 100190)  0x29e2be33 in poll ()
  10 Thread 2a404c40 (LWP 100191)  0x29ed85e7 in _umtx_op_err ()

And with this change:

(gdb) info threads
  41 Thread 0x9d80000 (LWP 100259/initial thread)  0x6a3f23ff in nanosleep ()
  40 Thread 0x9f48600 (LWP 100315/EventLoop)  0x6a38e427 in _umtx_op ()
  39 Thread 0x9f48800 (LWP 100321/ntfy)  0x6a38e427 in _umtx_op ()

-Ed



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101122174623.GA93150>