From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Claus Fischer Newsgroups: gmane.emacs.bugs Subject: bug#30044: Emacs: Gud-mode: Debugging with gud: Window switching problem Date: Thu, 11 Jan 2018 14:24:02 +0100 Message-ID: <20180111132401.l22y75dudoefxp5l@clausfischer.com> References: <20180109123311.klciuvflkdgm23pf@clausfischer.com> <20180110111945.fugo7cknqysarnny@clausfischer.com> <87fu7dp350.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pd7or3tbnloq6r2l" X-Trace: blaine.gmane.org 1515677074 11792 195.159.176.226 (11 Jan 2018 13:24:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Jan 2018 13:24:34 +0000 (UTC) User-Agent: NeoMutt/20170113 (1.7.2) Cc: 30044@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 11 14:24:30 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1eZcqI-0002TW-5U for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jan 2018 14:24:26 +0100 Original-Received: from localhost ([::1]:43156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZcsH-0001hc-Gh for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jan 2018 08:26:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZcqw-0000Yb-Ma for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2018 08:25:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZcqs-0005mT-Ke for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2018 08:25:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43851) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZcqs-0005mA-G9 for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2018 08:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eZcqs-000689-5M for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2018 08:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Claus Fischer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jan 2018 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30044 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30044-submit@debbugs.gnu.org id=B30044.151567704823498 (code B ref 30044); Thu, 11 Jan 2018 13:25:02 +0000 Original-Received: (at 30044) by debbugs.gnu.org; 11 Jan 2018 13:24:08 +0000 Original-Received: from localhost ([127.0.0.1]:51748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZcpz-00066u-Jm for submit@debbugs.gnu.org; Thu, 11 Jan 2018 08:24:07 -0500 Original-Received: from clausfischer.com ([78.46.66.52]:36504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZcpv-00066k-RU for 30044@debbugs.gnu.org; Thu, 11 Jan 2018 08:24:04 -0500 Original-Received: from boltzmann.clausfischer.com (localhost.localdomain [127.0.0.1]) by clausfischer.com (Postfix) with ESMTP id 226BE8A034A; Thu, 11 Jan 2018 14:24:02 +0100 (CET) Original-Received: from kepler.clausfischer.com (kepler.clausfischer.com [10.243.1.2]) by boltzmann.clausfischer.com (Postfix) with ESMTP id 0CF836803B8; Thu, 11 Jan 2018 14:24:02 +0100 (CET) Original-Received: by kepler.clausfischer.com (Postfix, from userid 1000) id 06DA07954F; Thu, 11 Jan 2018 14:24:02 +0100 (CET) Content-Disposition: inline In-Reply-To: <87fu7dp350.fsf@users.sourceforge.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142026 Archived-At: --pd7or3tbnloq6r2l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 10, 2018 at 08:58:51PM -0500, Noam Postavsky wrote: > Claus Fischer writes: >=20 > > If that is so, the solution for me would be simple: let gud not > > remember the window, but let it search for the window with buffer > > name *gud...* and switch to that one. I have only one such buffer. >=20 > That is basically what we have already, relevant code excerpts below. > When gdb prints that a breakpoint is hit, Emacs runs the process filter > which gud-mode sets up, `gud-filter'. It uses `get-buffer-window' to > find the corresponding window and switches to it while calling > `gud-display-frame'. And then `gud-display-line' shows the source > buffer in any window but the current one (i.e., the one showing the gdb > interaction). >=20 > So to fix this, we would need to follow along this code path and see > where things go wrong. This will be pretty much impossible without a > reliable way of triggering the problem, as suggested in > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D520647#10 I see. I'm sure you know the term 'Heisenbug'. :) The only thing I remember for sure is that the problem also occurred sometimes when stepping, either with 'n' or with 's', in gdb. But I assume that is handled just like breakpoints are. Is it possible to take a gud.el, sprinkle it liberally with some debug output, e.g. into Emacs' message buffer or on the terminal, and let me load it and wait for the problem to re-occur? Or can you give me some diagnostic procedure what to examine after it has occurred, e.g. which buffers are there, which were in which frame (to the best of my knowledge) etc.? Does Emacs have some debugging or recording mode for such situations? Best regards, Claus --=20 Claus Fischer http://www.clausfischer.com/ --pd7or3tbnloq6r2l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSsDMwfnPC53jWSFoqbrLFGHC9EiwUCWldlcQAKCRCbrLFGHC9E i6jJAJ9wbSzWviO2orQRhIYbLScJe/f+MwCffRHCVofNwDICWK7m0Ngo6Seb8lU= =5Hca -----END PGP SIGNATURE----- --pd7or3tbnloq6r2l--