From owner-svn-src-head@freebsd.org Mon Oct 2 20:33:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 973B6E27525; Mon, 2 Oct 2017 20:33:17 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62D1076FD4; Mon, 2 Oct 2017 20:33:17 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v92KXGgQ030132; Mon, 2 Oct 2017 20:33:16 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v92KXGsm030130; Mon, 2 Oct 2017 20:33:16 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201710022033.v92KXGsm030130@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Mon, 2 Oct 2017 20:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324219 - head/lib/libthr/thread X-SVN-Group: head X-SVN-Commit-Author: mizhka X-SVN-Commit-Paths: head/lib/libthr/thread X-SVN-Commit-Revision: 324219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Oct 2017 20:33:17 -0000 Author: mizhka Date: Mon Oct 2 20:33:16 2017 New Revision: 324219 URL: https://svnweb.freebsd.org/changeset/base/324219 Log: [libthr] revert change of visibility of _thread_keytable to unbreak debugger Fix regression by r318539. The sysutils/pstack uses library libthread_db to read information about threads state. The function pt_ta_new makes lookup of several key symbols including _thread_keytable. But r318539 mades this field static. It causes silent ignore of libthr library by pstack and as result sysutils/pstack doesn't output any thread information. This fix changes this field back to non-static. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D11738 Modified: head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_spec.c Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Mon Oct 2 20:02:25 2017 (r324218) +++ head/lib/libthr/thread/thr_private.h Mon Oct 2 20:33:16 2017 (r324219) @@ -719,6 +719,8 @@ extern char *_usrstack __hidden; extern int _libthr_debug; extern int _thread_event_mask; extern struct pthread *_thread_last_event; +/* Used in symbol lookup of libthread_db */ +extern struct pthread_key _thread_keytable[]; /* List of all threads: */ extern pthreadlist _thread_list; Modified: head/lib/libthr/thread/thr_spec.c ============================================================================== --- head/lib/libthr/thread/thr_spec.c Mon Oct 2 20:02:25 2017 (r324218) +++ head/lib/libthr/thread/thr_spec.c Mon Oct 2 20:33:16 2017 (r324219) @@ -42,7 +42,8 @@ __FBSDID("$FreeBSD$"); #include "thr_private.h" -static struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX]; +/* Used in symbol lookup of libthread_db */ +struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX]; __weak_reference(_pthread_key_create, pthread_key_create); __weak_reference(_pthread_key_delete, pthread_key_delete);