X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fcgen-run.c;h=e28feddc48b821186163b3f3c7ed5abb8fe5e966;hb=4744ac1bb0d2f2294c7762577262fdcafb67883b;hp=07ee19197d73d7dc0215c3bb2390d9e6f1e70c68;hpb=c906108c21474dfb4ed285bcc0ac6fe02cd400cc;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/common/cgen-run.c b/sim/common/cgen-run.c index 07ee19197d..e28feddc48 100644 --- a/sim/common/cgen-run.c +++ b/sim/common/cgen-run.c @@ -1,22 +1,21 @@ /* Main simulator loop for CGEN-based simulators. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2007 Free Software Foundation, Inc. Contributed by Cygnus Solutions. This file is part of GDB, the GNU debugger. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +You should have received a copy of the GNU General Public License +along with this program. If not, see . */ /* ??? These are old notes, kept around for now. Collecting profile data and tracing slow us down so we don't do them in @@ -93,9 +92,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);