all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: "Juan José García-Ripoll" <juanjose.garciaripoll@gmail.com>,
	emacs-devel@gnu.org,
	"Saulius Menkevičius" <sauliusmenkevicius@fastmail.com>
Subject: Re: gdb fails to flush output (msys2)
Date: Tue, 15 Mar 2022 12:48:17 +0100	[thread overview]
Message-ID: <77bec550-18e8-bcb9-0d32-b023f01eb3a4@secure.kjonigsen.net> (raw)
In-Reply-To: <86h77zwn9b.fsf@csic.es>

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

On 15.03.2022 10:58, Juan José García-Ripoll wrote:
> Eli Zaretskii<eliz@gnu.org>  writes:
>> Can you show how that program behaves when invoked from the system
>> shell, not under the debugger?  Also, if you invoke "M-x shell" inside
>> Emacs, and then run that program from the inferior shell, does it
>> behave correctly, or does it also hangs until you type Enter?
> Let me summarize all the questions in this single post. What is related
> to MSYS2 is the use of MSYS2's toolchains for building and debugging the
> software. There is nothing specific to MSYS2 other than specifying to
> Emacs that the debugger is c:/msys64/ucrt64/bin/gdb.exe or some other
> program from the toolchain I choose.
>
> Your paragraph abore is quite on spot. As I stated before, if I use M-x
> shell and invoke the debugger from the shell (still within Emacs)
> everything works just fine, so it is not a buffering issue. Also, to be
> more precise, within the debugger the program runs to completion, which
> means the output is completely unbuffered. It therefore should have been
> shown by Emacs' gdb already when I copied the text.
>
> Another indication that there is some problem with Emacs' GDB/GUD
> packages is that the output _is_ there. If I type a command right after
> the last shown output, gdb executes that command, and any following one,
> but re-displays the original output of the program again and again. It
> is somehow as if it had reinterpreted the program's output as a prompt.
>
> Is there a way I can debug how GUD is behaving or interfacing with gdb's
> output? I know some other major modes keep debugging information or
> intermediate buffers if requested. But I still have not found it for
> GUD.
>
> Best,
>
Could this error in any way be related to the previous issue with had 
with "use posix_spawn"? [1]

For those who need a reminder, as far as I understood it, the key issue 
there was that  a required bugfix for Mac (but also generally an 
optimization) was made into a default optimization for platforms, and 
the idea was that unless it was proven troublesome one could decide to 
keep it.

Well, on Linux it did cause some issues with triggering external 
processes. Specifically .NET-based tooling, made especially painful with 
.NET-based Language Server implementations no longer working (C# and F#).

If this is another instance of such a bug (and I'm deliberately 
qualifing that with an "if"), would it make sense to reverse this 
optimization on all platforms not Mac? There seems to be several 
unintended side-effects, and could possibly be more?

[1] https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg01561.html

-- 
Kind regards
*Jostein Kjønigsen*

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjønigsen.no <https://jostein.kjønigsen.no>

[-- Attachment #2: Type: text/html, Size: 3797 bytes --]

  reply	other threads:[~2022-03-15 11:48 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 [this message]
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
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=77bec550-18e8-bcb9-0d32-b023f01eb3a4@secure.kjonigsen.net \
    --to=jostein@secure.kjonigsen.net \
    --cc=emacs-devel@gnu.org \
    --cc=jostein@kjonigsen.net \
    --cc=juanjose.garciaripoll@gmail.com \
    --cc=sauliusmenkevicius@fastmail.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.