From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Debugging Emacs with threads Date: Mon, 12 Dec 2016 19:38:00 +0200 Message-ID: <837f75cakn.fsf@gnu.org> References: <83inqqe8kb.fsf@gnu.org> <99B23C4A-3861-4995-BE61-317359FB2214@raeburn.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1481566930 23363 195.159.176.226 (12 Dec 2016 18:22:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2016 18:22:10 +0000 (UTC) Cc: tom@tromey.com, emacs-devel@gnu.org To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 19:22:04 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGVEg-0004ry-79 for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 19:22:02 +0100 Original-Received: from localhost ([::1]:60877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGVEk-0002zK-G8 for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 13:22:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGUXX-0007rL-5F for emacs-devel@gnu.org; Mon, 12 Dec 2016 12:37:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGUXT-0002oS-3H for emacs-devel@gnu.org; Mon, 12 Dec 2016 12:37:27 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGUXT-0002oE-16; Mon, 12 Dec 2016 12:37:23 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4757 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cGUXS-0003r1-8u; Mon, 12 Dec 2016 12:37:22 -0500 In-reply-to: <99B23C4A-3861-4995-BE61-317359FB2214@raeburn.org> (message from Ken Raeburn on Sun, 11 Dec 2016 22:18:16 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210365 Archived-At: > From: Ken Raeburn > Date: Sun, 11 Dec 2016 22:18:16 -0500 > Cc: Tom Tromey , > emacs-devel@gnu.org > > Perhaps a new thread-local variable which has the value of current_thread when the thread is the current Lisp thread. Or we could invoke sys_thread_self() to compare against current_thread->thread_id; it’s not like xbacktrace works on a core file anyway. (I’m assuming GDB will invoke a function or look at TLS in the context of the current OS thread, or the appropriate OS thread when invoked via something like “thread apply all bt”.) Thanks, I will see if I can solve the problem that way.