From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juan =?utf-8?Q?Jos=C3=A9_Garc=C3=ADa-Ripoll?= Newsgroups: gmane.emacs.devel Subject: gdb fails to flush output (msys2) Date: Mon, 14 Mar 2022 12:18:22 +0100 Message-ID: <86y21caikh.fsf@csic.es> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31450"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (windows-nt) To: emacs-devel@gnu.org Cancel-Lock: sha1:TBvVWQdVLZJkJUIEJTd6/cP/WyU= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 14 12:22:01 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTim1-0007w9-3U for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Mar 2022 12:22:01 +0100 Original-Received: from localhost ([::1]:40716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTilz-0008SI-Nm for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Mar 2022 07:21:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTiig-0003ze-Gj for emacs-devel@gnu.org; Mon, 14 Mar 2022 07:18:34 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:56086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTiie-0001Ll-GX for emacs-devel@gnu.org; Mon, 14 Mar 2022 07:18:34 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nTiic-0003Om-Mg for emacs-devel@gnu.org; Mon, 14 Mar 2022 12:18:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287134 Archived-At: Hi, I am trying to debug some programs on Windows using MSYS2. In doing so, I noticed that the gdb mode is not working well with the output from the debugger. Specifically, when I start the debugger I get the expected prompt. I can also issue simple commands, such as "help", or "target exec". However, once I press run and my program executes, the output from the program is withheld. This output appears if I press ENTER again, but when I do so, the program's output appears again and again -- it seems as if it was reinterpreted as part of the prompt. GDB is currently invoked through a wrapper I set up to find the executable https://github.com/juanjosegarciaripoll/project-cmake However, the same problem is witnessed with a modern installation of MSYS2 and this little elisp script: (let* ((msys2 "C:/msys64/ucrt64/bin") (path (concat msys2 ";" (getenv "PATH"))) (default-process-coding-system 'utf-8-unix) (process-environment (cl-list* (concat "PATH=" path) "MSYSTEM=ucrt64" process-environment))) (call-interactively #'gdb)) Best, -- Juan José García Ripoll http://juanjose.garciaripoll.com http://quinfog.hbar.es