all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Juan José García-Ripoll" <juanjose.garciaripoll@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: gdb fails to flush output (msys2)
Date: Tue, 15 Mar 2022 18:53:09 +0200	[thread overview]
Message-ID: <83h77zi2dm.fsf@gnu.org> (raw)
In-Reply-To: <86v8wf9rly.fsf@csic.es> (juanjose.garciaripoll@gmail.com)

> From: Juan José García-Ripoll
>  <juanjose.garciaripoll@gmail.com>
> Date: Tue, 15 Mar 2022 16:12:57 +0100
> 
> I think I have identified the problem. The code in Emacs assumes that
> all process output is going to be prefixed by @. This is only the case
> for truely asynchronous debugging (see
> https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records).
> 
> There seems to be code in gdb-mi.el for transforming the debugging
> experience into a remote one, such as gdb-inferior-io--init-proc, which
> aims to redirect the subprocess to a tty, but this seems to have no
> effect on Windows.
> 
> Indeed, if once sets a tracepoint around gud-filter and
> gud-gdbmi-marker-filter, the output is very different on Linux and on
> Windows (see text files attached). Linux has successfully redirected the
> output of the debugged subprocess, while the MSYS2 process gets the
> output of the process mixed with GDB output.

This GDB feature doesn't work on MS-Windows, only on Posix systems.
But my problem is to understand how come my own debugging using
gdb-mi.el on MS-Windows generally works regardless of this issue with
separating the I/O of the debuggee.  I'm being slowly drawn to the
conclusion that the solution of that puzzle is in what your program
that you are debugging does.  E.g., do you see something similar if
you debug any other console MinGW program with "M-x gdb"?

> I am a bit stuck. I assume I should simply use the old gud-gdb interface.

That's a possibility, yes.



  reply	other threads:[~2022-03-15 16:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 11:18 gdb fails to flush output (msys2) Juan José García-Ripoll
2022-03-14 13:33 ` Eli Zaretskii
2022-03-14 17:55   ` Juan José García-Ripoll
2022-03-14 18:23     ` Eli Zaretskii
2022-03-14 18:40       ` Eli Zaretskii
2022-03-15  9:58         ` Juan José García-Ripoll
2022-03-15 11:48           ` Jostein Kjønigsen
2022-03-15 13:24             ` Juan José García-Ripoll
2022-03-15 13:33               ` Juan José García-Ripoll
2022-03-15 14:34                 ` Eli Zaretskii
2022-03-15 14:40                   ` Juan José García-Ripoll
2022-03-15 16:47                     ` Eli Zaretskii
2022-03-15 17:38                       ` Juan José García-Ripoll
2022-03-15 17:56                         ` Eli Zaretskii
2022-03-15 15:12                   ` Juan José García-Ripoll
2022-03-15 16:53                     ` Eli Zaretskii [this message]
2022-03-15 14:25             ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=83h77zi2dm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juanjose.garciaripoll@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.