From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Debugging Emacs with threads Date: Sun, 11 Dec 2016 17:43:56 +0100 Message-ID: <87pokyju0j.fsf@linux-m68k.org> References: <83inqqe8kb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1481474653 4944 195.159.176.226 (11 Dec 2016 16:44:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Dec 2016 16:44:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.90 (gnu/linux) Cc: Tom Tromey , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 11 17:44:08 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 1cG7EL-0008W9-Ib for ged-emacs-devel@m.gmane.org; Sun, 11 Dec 2016 17:44:05 +0100 Original-Received: from localhost ([::1]:56242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG7EP-0008Qm-Pl for ged-emacs-devel@m.gmane.org; Sun, 11 Dec 2016 11:44:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG7EK-0008Qf-GW for emacs-devel@gnu.org; Sun, 11 Dec 2016 11:44:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cG7EJ-0007ov-Nc for emacs-devel@gnu.org; Sun, 11 Dec 2016 11:44:04 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:50084) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cG7EF-0007ni-V2; Sun, 11 Dec 2016 11:44:00 -0500 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3tcBct2NtXz3hhsl; Sun, 11 Dec 2016 17:43:58 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3tcBct22CGzvk8M; Sun, 11 Dec 2016 17:43:58 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id F6jo6PEfI6Br; Sun, 11 Dec 2016 17:43:57 +0100 (CET) X-Auth-Info: ojIGuT6vbVLO5pS0rQq3KmgwZyUTW3QqxcHHS95E31qqvvt4PSFBAQQUcVK0uexT Original-Received: from igel.home (ppp-88-217-26-235.dynamic.mnet-online.de [88.217.26.235]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 11 Dec 2016 17:43:57 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 1000) id C6F4C2C4C66; Sun, 11 Dec 2016 17:43:56 +0100 (CET) X-Yow: I once decorated my apartment entirely in ten foot salad forks!! In-Reply-To: <83inqqe8kb.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 11 Dec 2016 18:26:12 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 212.18.0.10 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:210285 Archived-At: On Dez 11 2016, Eli Zaretskii wrote: > When Emacs stops due to a breakpoint, the thread that is the current > one is in sync between GDB and Emacs. IOW, the current_thread > variable describes the same thread on which GDB commands will act. > But as soon as you say something like "thread 1" at the GDB prompt, > this synchronization is lost: GDB acts on the thread you specified, > while current_thread is still pointing at the thread which was the > current one when Emacs stopped. Why isn't current_thread a thread-local variable? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."