This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Cycle stepping
- To: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: Cycle stepping
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 12 Feb 2000 17:22:40 +1100
- CC: gdb at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <14500.60988.450983.214268@ongaonga.elec.canterbury.ac.nz>
Michael Hayes wrote:
>
> I'm in the process of revitalising the tic4x target for submission.
> One big change that I've noticed is that a simulator can no longer use
> any of gdb's routines.
>
> Now one useful feature we had with the c4x simulator was to provide
> single cycle stepping to observe the operation of the pipeline. This
> was achieved by adding a couple of new commands to gdb's interpreter
> (stepc and nextc) whenever the c4x simulator was fired up. Now in the
> process of making the c4x simulator stand-alone, does anyone know of a
> simple way that this functionality can be added to gdb?
>
> Presently, stepc is similar to stepi but we use a flag to tell the
> simulator to stop after a cycle. Is there a mechanism for
> communicating parameters like this to the simulator to avoid having to
> add another argument to target_resume?
You could table a proposal that ``step'' become an enum - run=0,
stepc=1, stepi=2. Which would accomodate backward compatibility.
Andrew
(Disclaimer - I've not thought this through and from memory you also
need a bit of serious WaitForInferior hacking).