delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:subject:date:message-id:references | |
:in-reply-to:content-type:content-transfer-encoding | |
:mime-version; q=dns; s=default; b=eV9R+s/Kww6QhqDwTgfikngsL5/YK | |
hcBkWi/3SoiXmwJAHBIlVB2zYZuBCFP/52odZJIHVj7xyvE8b6vwn4w57v4HvekD | |
+QEKYxpnpY1/MdbKZoMCaCltTXLXCISXw2aKq1NVbcl+sXfqOASV+7bEe5zy8VIt | |
vZFm3R+yqzQQ64= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:subject:date:message-id:references | |
:in-reply-to:content-type:content-transfer-encoding | |
:mime-version; s=default; bh=/MIoydG4i65KnsbPnfAjHYEsjak=; b=P2a | |
DGrMau+DEYEhyjnCD5zsZA31PY4M8+dP4H/wmF1cVtk/J3SBmLUHpiJ/Lph25k/4 | |
kDVf51PI3um0xbriqDKKEa6xBl0VY5oLGyFv/xUWEEOUZXd8QmlLe94Od1c6YcYN | |
HcyeI7nsUSfjgd/stZHj5zdKve5uUC5zYajFcES0= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-1.1 required=5.0 tests=AWL,BAYES_00,CYGWIN_OWNER_BODY,GIT_PATCH_2,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=staff, ans, Supply, Starting |
X-HELO: | NAM10-DM6-obe.outbound.protection.outlook.com |
ARC-Seal: | i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TDnXTInsb/EeLOm+G23U7SncRp0uN4KNPyVvbsTdysbJua8Kp78mep394iY48jrIoRN5OumyJQhaOwkgas6iXssj7N2Rzs4lHufj0oNmneWn2xTUuIqRnjY9MsSiHsbodx/Tlt4dmuKgJsGf4nyiRPknNoHaBc1ZK6f7645Q2WnxwrR2Y+qE0+x2o75BKNN+IW5gzk94NwWlwp4qi0I1l1S8jvdHZnyxQ8ngP3NnvDcjAc9Vtcw/U8v2ffIHt0VNcVmu0DT/oUNnjmDyd4cxNZTNMWoeCr1Od3TMBUsyopBW5UW0x9ZLpVBO4+rcVVBSJL2gQ2Fej8QA4LuXWeahsw== |
ARC-Message-Signature: | i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aDJgLpyMbHZV+WxoCM/spW0RXwl85E6/2CRpEGo0Ar4=; b=b1KLvAf1JYyaManb2zASsG67SzmP7ch+mb5VD+GDALogpGqJEhWuPhJILwLTKQ4cF8oszLKuBtPEd7/zCedStkDmMWq2Gaop25s8jUmrMBFzoNQdYK8pdADO5db24m2gp1+87mbEuHyzW63iHCuUty/vN/wdZhPrEK9oYYcVB7j4jhCapEa3kRe/ODIq3a9/a61dTF/3h2Ktx6loxTFn/SsGfC+RgpMDW/VPEeVIr6I02M+JDf7xp6+2oPHORZMbEWZqlaiShc0kazn7YZ8LI4fEu9huX1YN3XZuOFaS19KYLLRDrdcfBhsWcOUqfW+J+QtFyiV6s0Qgc+EYoxLv6w== |
ARC-Authentication-Results: | i=1; mx.microsoft.com 1; spf=pass (sender ip is 66.109.88.133) smtp.rcpttodomain=cygwin.com smtp.mailfrom=flightsafety.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=flightsafety.com; dkim=none (message not signed); arc=none |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=flightsafety.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aDJgLpyMbHZV+WxoCM/spW0RXwl85E6/2CRpEGo0Ar4=; b=FhRWKLwAccvCl9dqcwuBJpXkE1pIa+6109z7rBZH6flFFe6Wx57VD6e3p+E4MflAvFnhYQHuINhL4qoKJsr9h4DKls18yqN1p/Wvowz/TFEoaKIWrsn62Sw2/34Gk69UjG47iHDdc0JP/5NTdEn7SsjrxByMtjIUN7ehLujRvnQ= |
Authentication-Results: | spf=pass (sender IP is 66.109.88.133) smtp.mailfrom=flightsafety.com; cygwin.com; dkim=none (message not signed) header.d=none;cygwin.com; dmarc=pass action=none header.from=flightsafety.com; |
Received-SPF: | Pass (protection.outlook.com: domain of flightsafety.com designates 66.109.88.133 as permitted sender) receiver=protection.outlook.com; client-ip=66.109.88.133; helo=p0001ws0011.flightsafety.com; |
From: | "Rockefeller, Harry" <Harry DOT Rockefeller AT flightsafety DOT com> |
To: | The Cygwin Mailing List <cygwin AT cygwin DOT com> |
Subject: | RE: cin and read(*,*) not waiting for kbd input in gdb |
Date: | Tue, 21 Jan 2020 21:58:19 +0000 |
Message-ID: | <691b0f69130c46ad90ea6ddf93d3b1be@vsrv060ex01.ssd.fsi.com> |
References: | <552d8b06cb6e431fb00f581c7853b795 AT vsrv060ex01 DOT ssd DOT fsi DOT com> <ba72d46a-1f44-e313-5ce9-e496e1adbf6c AT dronecode DOT org DOT uk> <78b75f32051c4c83a43b0adc2c65dbb5 AT vsrv060ex01 DOT ssd DOT fsi DOT com> |
In-Reply-To: | <78b75f32051c4c83a43b0adc2c65dbb5@vsrv060ex01.ssd.fsi.com> |
MIME-Version: | 1.0 |
X-MS-Oob-TLC-OOBClassifiers: | OLM:8273; |
X-MS-Exchange-SenderADCheck: | 1 |
X-IsSubscribed: | yes |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 00LLx8FN012608 |
>-----Original Message----- > From: cygwin-owner AT cygwin DOT com <cygwin-owner AT cygwin DOT com> On Behalf Of Rockefeller, Harry >Sent: Friday, January 17, 2020 11:35 AM >To: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>; The Cygwin Mailing List <cygwin AT cygwin DOT com> >Subject: RE: cin and read(*,*) not waiting for kbd input in gdb >>>-----Original Message----- >>>From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk> >>Sent: Friday, January 17, 2020 9:40 AM >>To: The Cygwin Mailing List <cygwin AT cygwin DOT com> >>Cc: Rockefeller, Harry <Harry DOT Rockefeller AT flightsafety DOT com> >>Subject: Re: cin and read(*,*) not waiting for kbd input in gdb >>EXTERNAL EMAIL: STOP and verify sender address, links, and attachments before taking action. >>On 16/01/2020 21:02, Rockefeller, Harry wrote: >>> Both the Fortran and cpp used to work correctly when run in gdb. >> >>Thanks for reporting this problem. >> >>I assume this means that this worked with gdb-8.1.1-1, but not with >>gdb-8.2.1-1 (Made available for testing 2019-03-21 [1], promoted to >>current 2020-01-07 [2]) >> >>Firstly, can I suggest that if a working gdb is important to you, you try test versions when they are available. Wider testing helps me make good releases of gdb. >>Secondly, can you try the recently made test release of gdb-8.3.1-1 [3], to see if this behaves differently? If that doesn't help, you can downgrade to 8.1.1-1 for the moment... >I certainly plan to do that as soon as problem(s) are identified. >>[1] https://cygwin.com/ml/cygwin-announce/2019-03/msg00032.html >>[2] https://cygwin.com/ml/cygwin/2020-01/msg00064.html >>[3] https://cygwin.com/ml/cygwin-announce/2019-12/msg00033.html >> >>> FWIW, Both Fortran and cpp work correctly, stopping for keyboard input, when run outside of gdb. >>> >>> But now, code simply doesn't stop to take keyboard input inside gdb. >>> >>> [C++ test code omitted for brevity] >>I'm not able to reproduce this problem. Perhaps you can provide a similar transcript showing the steps to reproduce? >I see that when I ran it I also had a few lines like these: >[New Thread 6188.0x1e54]. >Since I develop mostly for "hard" real time, my default boot is a Win7 with RTX. >I rebooted my pc with the Win7 alone (no RTX) and the stdin does work as you show below. >I am working with my software support staff to find out if anything changed recently in my PC boot stuff. >>> $ gdb rockefeller.exe >>> GNU gdb (GDB) (Cygwin 8.2.1-1) 8.2.1 >>> Copyright (C) 2018 Free Software Foundation, Inc. >>> License GPLv3+: GNU GPL version 3 or later >>> <http://gnu.org/licenses/gpl.html> >>> This is free software: you are free to change and redistribute it. >>> There is NO WARRANTY, to the extent permitted by law. >>> Type "show copying" and "show warranty" for details. >>> This GDB was configured as "x86_64-pc-cygwin". >>> Type "show configuration" for configuration details. >>> For bug reporting instructions, please see: >>> <http://www.gnu.org/software/gdb/bugs/>. >>> Find the GDB manual and other documentation resources online at: >>> <http://www.gnu.org/software/gdb/documentation/>. >>> >>> For help, type "help". >>> Type "apropos word" to search for commands related to "word"... >>> Reading symbols from rockefeller.exe...done. >>> (gdb) b request_time_to_run() >>> Breakpoint 1 at 0x1004010e8: file rockefeller.cpp, line 10. >>> (gdb) r >>> Starting program: /wip/rockefeller.exe >>> >>> Thread 1 "rockefeller" hit Breakpoint 1, request_time_to_run () at rockefeller.cpp:10 >>> 10 float tm = 0.0; // Time duration (sec) >>> (gdb) n >>> 11 std::string ans = ""; // interactive answer for time duration >>> (gdb) n >>> 12 std::cout << "Supply the equivalent of runtime in seconds. \n"; >>> (gdb) n >>> Supply the equivalent of runtime in seconds. >>> 13 std::cout << "Note: time=0 will stop main. \n"; >>> (gdb) n >>> Note: time=0 will stop main. >>> 14 std::cin >> ans; >>> (gdb) n >>> 1 >>> 15 if ( (int)(ans[0]) < 48 || (int)(ans[0] > 57) ) { >>> (gdb) n >>> 19 int j = 0; >>> (gdb) c >>> Continuing. >>> a is 1.000000 >>> [Inferior 1 (process 12660) exited normally] >>> But, simple stuff does run correctly in gdb stopping for terminal input at >>> std::cin >> ans; >>> FWIW, for simple cpp above neither the cout nor the cin works directly (not running in gdb). >>Although not related to gdb, that would be a serious cygwin bug. >I am still in the Win7 only boot on my PC ... no RTX >More on this last problem. This time using Fortran. >Test code: > program test > implicit none > real cycle_time_preset /0.0/ ! (seconds) > real cycle_length /0.0/ ! (seconds) > do > if (cycle_time_preset.le.0.0) then > write(*,*)'Supply the equivalent of run time in seconds.' > write(*,"('(Note: a negative run time will stop run): ',$)") > read(*,*) cycle_length >else > cycle_length = cycle_time_preset >end if >if (cycle_length .lt. 0.0) stop 'normal termination' >end do >stop >end >$ /usr/bin/gfortran -g -ffree-form -ffree-line-length-none -Wunused -ffpe-trap=invalid,zero,overflow -o test.exe test.f >harryr AT HARRYR-PC ~/ >$ test.exe > >$ >Neither standard output nor input works. >FWIW, running in gdb both standard input and output work. Following your test I do not have cin wait for kbd input whenever a breakpoint is set. In fact, if I run 'disa 1' to disable the breakpoint and then just 'run' (to restart the program from the beginning) then the program does pause for my keyboard input. This happens in both my Win 7 and Win 7 - RTX OS boots. This happens in both gdb 8.2.1-1 and 8.3.1-1. It does not happen with Gdb version 8.1.1-1. Egg on my face now: never mind the stuff about cin and cout Not working when run directly. This was my error. 'gdb test.exe' ran the local test.exe, but just 'test.exe' ran /usr/bin/test. I should have been running './test.exe'. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |