2003-06-17 Doug Evans <dje@sebabeach.org>
[binutils-gdb.git] / sim / common / cgen-run.c
index 07ee19197d73d7dc0215c3bb2390d9e6f1e70c68..031bc1c69ea8fda7bceb50a9c8e4dc6e447b5f3c 100644 (file)
@@ -93,9 +93,13 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
         way to identify this case.  */
       int max_insns = (step
                       ? 1
-                      : (nr_cpus == 1 /*&& wip:no-events*/)
+                      : (nr_cpus == 1
+                         /*&& wip:no-events*/
+                         /* Don't do this if running under gdb, need to
+                            poll ui for events.  */
+                         && STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE)
                       ? 0
-                      : 4); /*FIXME: magic number*/
+                      : 8); /*FIXME: magic number*/
       int fast_p = STATE_RUN_FAST_P (sd);
 
       sim_events_preprocess (sd, last_cpu_nr >= nr_cpus, next_cpu_nr >= nr_cpus);