delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/14/15:42:46

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: ecserv7.uwaterloo.ca: www set sender to y2bismil AT engmail DOT uwaterloo DOT ca using -f
Message-ID: <1068842483.3fb53df3678d6@www.nexusmail.uwaterloo.ca>
Date: Fri, 14 Nov 2003 15:41:23 -0500
From: y2bismil AT engmail DOT uwaterloo DOT ca
To: cygwin AT cygwin DOT com
Subject: insight debugger locks up
MIME-Version: 1.0
User-Agent: Internet Messaging Program (IMP) 3.1 / FreeBSD-4.6.2
X-Originating-IP: 207.245.22.25


Hi all,

i'm using the insight debugger from the lastest cygwin package.  It seems to be
locking up when trying to step through code.  The following program isolates the
issue on my system

******************************************************
#include <io.h>
#include <stdio.h>
#include  <fcntl.h>
#include <sys/stat.h>
#include <conio.h>

int main()
{
   int handle;
   handle= creat("hello.txt", 0);
   if (handle == -1)
   {
      printf("Unable to creat file hello.txt\r\n");
   }

   write(handle, "Hello\r\n",7);
   close(handle);

   handle= open("hello.txt", O_RDWR|O_BINARY, S_IREAD | S_IWRITE);
   if (handle == -1)
   {
      printf("Unable to open file hello.txt\r\n");
   }
   write(handle, "urdum\r\n",7);
   close(handle);

  while(1)
 {
	char c = kbhit();
       if(c)
       {
            c = getch();
            char buffer[12];
            buffer[0] = c;
            buffer[1] = '\0';
            printf(buffer);
            break;
       }
        
 }
}


Compile line:

g++ -g -mno-cygwin -isystemC:/cygwin/usr/include/mingw -o main.exe  main.cpp
******************************************************
What I do:
Start the insight debugger.  Use Next (not even step into).  Stepping over this
line:  handle= creat("hello.txt", 0); causes a lockup of insight.  Yet, I get
the printfs:

printf("Unable to creat file hello.txt\r\n");
printf("Unable to open file hello.txt\r\n").

My problem first arose after trying out kbhit, which locks up.  Then I went to
my little file test program and it has the same problem.
Any ideas?

Yamin

----------------------------------------
This mail sent through www.mywaterloo.ca

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019