This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Ctrl-C strange behavior




I verified this.
Here is a patch, which I will commit shortly.

Elena

2000-05-12  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>

	* gdbtk.c: Remove CYGWIN32 conditional around timer machinery.
  	Cygwin can handle timers fine now.	


Index: gdbtk.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.3
diff -u -p -r1.3 gdbtk.c
--- gdbtk.c	2000/05/01 04:46:49	1.3
+++ gdbtk.c	2000/05/12 18:03:12
@@ -67,7 +67,6 @@
 
 extern void _initialize_gdbtk (void);
 
-#ifndef __CYGWIN32__
 /* For unix natives, we use a timer to periodically keep the gui alive.
    See comments before x_event. */
 static sigset_t nullsigmask;
@@ -81,7 +80,6 @@ x_event_wrapper (signo)
 {
   x_event (signo);
 }
-#endif
 

  /*
   * These two variables control the interaction with an external editor.
@@ -104,9 +102,7 @@ static void cleanup_init PARAMS ((int));
 
 static void tk_command PARAMS ((char *, int));
 
-#ifndef __CYGWIN32__
 static int target_should_use_timer PARAMS ((struct target_ops * t));
-#endif
 
 int target_is_native PARAMS ((struct target_ops *t));
 
@@ -115,9 +111,7 @@ int gdbtk_test PARAMS ((char *));
 /* Handle for TCL interpreter */
 Tcl_Interp *gdbtk_interp = NULL;
 
-#ifndef __CYGWIN32__
 static int gdbtk_timer_going = 0;
-#endif
 
 /* linked variable used to tell tcl what the current thread is */
 int gdb_context = 0;
@@ -266,7 +260,6 @@ gdbtk_interactive ()
 void
 gdbtk_start_timer ()
 {
-#ifndef __CYGWIN32__
   static int first = 1;
 
   if (first)
@@ -303,28 +296,22 @@ gdbtk_start_timer ()
 	  gdbtk_timer_going = 1;
 	}
     }
-#else /* __CYGWIN32__ */
   return;
-#endif
 }
 
 /* Stop the timer if it is running. */
 void
 gdbtk_stop_timer ()
 {
-#ifndef __CYGWIN32__
   if (gdbtk_timer_going)
     {
       gdbtk_timer_going = 0;
       setitimer (ITIMER_REAL, &it_off, NULL);
       sigaction (SIGALRM, &act2, NULL);
     }
-#else /* __CYGWIN32__ */
   return;
-#endif
 }
 
-#ifndef __CYGWIN32__
 /* Should this target use the timer? See comments before
    x_event for the logic behind all this. */
 static int
@@ -333,7 +320,6 @@ target_should_use_timer (t)
 {
   return target_is_native (t);
 }
-#endif /* !__CYGWIN32__ */
 
 /* Is T a native target? */
 int




Scott A Sumner writes:
 > Chris (& others)--
 > 
 > Actually it looked like there were three routines to hit:
 > 
 > 1) gdbtk_start_timer
 > 2) gdbtk_stop_timer
 > 3) target_should_use_timer
 > 
 > I pulled the #ifdef conditionals out, and left the 'return's in.
 > Did I make the right call here?
 > 
 > 
 > 
 > >>My problem:  If my target runs at full speed, I have no way to tell
 > >>Insight I want to break execution wherever it happens to be.  As 
 > >>soon as
 > >>I hit the continue button, Insight changes the cursor to an 
 > >>hourglass and
 > >>just hangs (if I don't have a breakpoint set that execution will 
 > >>hit).  I
 > >>can't do anything except kill gdb and restart it.  I want to press 
 > >>the
 > >>stop button but as Insight appears to be hung at this point, it 
 > >>doesn't
 > >>work.  This is *extremely* annoying; anyone have any idea why it 
 > >>does
 > >>this and what the solution/workaround might be?
 >  
 > > Try removing the "#ifdef __CYGWIN32__" (sic) conditional in 
 > > gdbtk_start_timer
 > > and also try using the latest cygwin net release.  It's available 
 > > at:
 > > 
 > > http://sourceware.cygnus.com/cygwin/
 > > 
 > > cgf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]