unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Claus Fischer <claus.fischer@clausfischer.com>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 30044@debbugs.gnu.org
Subject: bug#30044: Emacs: Gud-mode: Debugging with gud: Window switching problem
Date: Thu, 11 Jan 2018 14:24:02 +0100	[thread overview]
Message-ID: <20180111132401.l22y75dudoefxp5l@clausfischer.com> (raw)
In-Reply-To: <87fu7dp350.fsf@users.sourceforge.net>

[-- Attachment #1: Type: text/plain, Size: 1864 bytes --]

On Wed, Jan 10, 2018 at 08:58:51PM -0500, Noam Postavsky wrote:
> Claus Fischer <claus.fischer@clausfischer.com> writes:
> 
> > 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.
> 
> 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).
> 
> 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=520647#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

-- 
Claus Fischer <claus.fischer@clausfischer.com>
http://www.clausfischer.com/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2018-01-11 13:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 12:33 bug#30044: Emacs: Gud-mode: Debugging with gud: Window switching problem Claus Fischer
2018-01-09 18:44 ` Eli Zaretskii
2018-01-09 20:58   ` Claus Fischer
2018-01-10  3:28     ` Eli Zaretskii
2018-01-10  3:39 ` Noam Postavsky
2018-01-10 11:19   ` Claus Fischer
2018-01-11  1:58     ` Noam Postavsky
2018-01-11 13:24       ` Claus Fischer [this message]
2018-01-12  1:24         ` Noam Postavsky
2018-05-20 23:52 ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180111132401.l22y75dudoefxp5l@clausfischer.com \
    --to=claus.fischer@clausfischer.com \
    --cc=30044@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).