This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: [Patch 6/7]: 68HC11 port of gdb (sim-misc single step fix)


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

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