From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125455 invoked by alias); 12 Mar 2015 17:11:58 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 124373 invoked by uid 89); 12 Mar 2015 17:11:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout29.012.net.il Received: from mtaout29.012.net.il (HELO mtaout29.012.net.il) (80.179.55.185) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Mar 2015 17:11:55 +0000 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NL300F00ZIKG700@mtaout29.012.net.il> for gdb@sourceware.org; Thu, 12 Mar 2015 19:08:14 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NL300DLZZLP1520@mtaout29.012.net.il> for gdb@sourceware.org; Thu, 12 Mar 2015 19:08:14 +0200 (IST) Date: Thu, 12 Mar 2015 17:11:00 -0000 From: Eli Zaretskii Subject: Inadvertently run inferior threads To: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83h9tq3zu3.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00024.txt.bz2 This happens to me quite a lot when I debug Emacs on Windows and invoke a command that calls a function in the inferior: Breakpoint 3, font_matches_spec (type=4, font=0x88b678, spec=22662725, backend=33216, logfont=0x88b860) at w32font.c:1197 1197 if (! memq_no_quit (val, support)) (gdb) p val $1 = -7860248 (gdb) xtype Lisp_Symbol (gdb) xsymbol $2 = (struct Lisp_Symbol *) 0x1913eb0 "mathematical-bold" (gdb) n 1198 return 0; (gdb) p support $3 = 25938803 (gdb) pp support [New Thread 20240.0x1134] [New Thread 20240.0x445c] (symbol arabic hebrew cyrillic greek phonetic latin) (gdb) c Continuing. Cannot execute this command while the selected thread is running. (gdb) info threads Id Target Id Frame 6 Thread 20240.0x445c (running) 5 Thread 20240.0x1134 (running) 4 Thread 20240.0x24bc (running) 3 Thread 20240.0x1cb4 (running) 2 Thread 20240.0xb5c (running) * 1 Thread 20240.0x464c (running) "pp" is in this case the command that invokes an inferior function, see src/.gdbinit in the Emacs sources for the details. 'support' is a Lisp object, a list in this case, and "pp" displays it in human-readable form. Note that invoking "pp" started 2 new threads in the inferior, for some reason -- neither the command itself nor the function it invokes start any threads. It's Windows itself that starts them, so it seems. I only see this on Windows 7, never on XP (didn't try newer versions). Once this happens, the debugging session seems to be ruined: the only thing I can do is kill the inferior and quit the debugger. Because there doesn't seem to be any way of stopping the threads again, not on Windows anyway. Am I the only one who sees this annoying problem? Does anyone know how to avoid it, or where to look for fixing it? TIA