Re: Commit: Export AArch64 sum's single step function

Mike Frysinger
2016-08-11T16:20:21Z

[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

On 11 Aug 2016 16:32, Nick Clifton wrote:
> Hi Mike,
> > this is already possible with the common sim API -- sim_resume() has a
> > "step" argument specifically to do single stepping.
>
> Hmm, OK, but how is this single stepping communicated to the target simulator ?
>
> As far as I can see the AArch64 simulator does not support single stepping
> (unless the host has inserted breakpoint instructions into the simulated instruction
> space). I assume that this is a bug in the aarch64 simulator code, but what exactly
> is wrong ?
>
> Hmm, I see that some other target simulators implement a sim_resume() function of
> their own. Perhaps this is the problem - the aarch64 sim should do the same ?

no, you don't want to implement sim_resume. any sim that does you should
ignore. i think the prob is that the aarch64 sim_engine_run is missing a
call to sim_events_process. look at ft32/interp.c for a bare bones example.

once you do that, you'll see the common sim_resume schedules an event after
one tick when step==true.

honestly, i'm a little surprised things are working w/out this event process
callback ...
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]