This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [Patch 6/7]: 68HC11 port of gdb (sim-misc single step fix)
- To: Stephane Carrez <Stephane dot Carrez at free dot fr>
- Subject: Re: [Patch 6/7]: 68HC11 port of gdb (sim-misc single step fix)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 27 Jul 2000 21:52:31 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <39568A82.A0B2BFEB@free.fr>
Stephane Carrez wrote:
> 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
>
> * nrun.c (main): Print the simulator statistics only in
> verbose mode.
> * hw-properties.h (hw_find_integer_array_property): Fix
> prototype (use signed_cell).
I've committed these, thanks.
> * sim-resume.c (sim_resume): Install the single step event
> after having processed some current pending events. It may happen
> that some ticks are not yet processed after a break/single step
> command from GDB. In that case, installing the single step event
> before processing pending events will activate the single step
> without actually having executed any instruction.
I don't think this is right. When the simulator does a restart, a
second has_stepped event would be scheduled and the first would be lost.
Andrew
> diff -Nrup --exclude-from=gdb-exclude.lst /src/gnu/cygnus/gdb/sim/common/sim-resume.c gdb/sim/common/sim-resume.c
> --- /src/gnu/cygnus/gdb/sim/common/sim-resume.c Mon Jul 12 13:14:09 1999
> +++ gdb/sim/common/sim-resume.c Mon Feb 21 09:00:23 2000
> @@ -51,8 +51,6 @@ sim_resume (SIM_DESC sd,
> sim_events_deschedule (sd, engine->stepper);
> engine->stepper = NULL;
> }
> - if (step)
> - engine->stepper = sim_events_schedule (sd, 1, has_stepped, sd);
>
> sim_module_resume (sd);
>
> @@ -69,6 +67,9 @@ sim_resume (SIM_DESC sd,
> sim_events_preprocess (sd, last_cpu_nr >= nr_cpus, next_cpu_nr >= nr_cpus);
> if (next_cpu_nr >= nr_cpus)
> next_cpu_nr = 0;
> +
> + if (step)
> + engine->stepper = sim_events_schedule (sd, 1, has_stepped, sd);
>
> /* Only deliver the siggnal ]sic] the first time through - don't
> re-deliver any siggnal during a restart. */
Note the comment about siggnals[sic].
Andrew