Re: [PATCH v3 08/10] Support software single step on ARM in GDBServer.

Antoine Tremblay
2015-11-26T16:07:40Z

On 11/26/2015 11:03 AM, Yao Qi wrote:
>
>
> On 26/11/15 15:11, Antoine Tremblay wrote:
>> This is the same link as the previous one...
>>
>
> Oops, sorry, https://sourceware.org/ml/gdb-patches/2007-06/msg00087.html
>
Thanks

>
>> IMO, it is
>>> better to use regcache than frame. We have two options,
>>>
>>> #1, switch from frame apis to regcache apis to access registers in arm
>>> software single step. We can get regcache by get_current_regcache
>>> ().
>>> #2, change argument of gdbarch method software_single_step from frame
>>> to regcache, which means all its implementations need update, and
>>> switch to regcache apis to access registers.
>>>
>>> #2 is the right way to go in long term, and we really need to improve
>>> software_single_step. Let me what do you think.
>>>
>>
>> Looking at the impacts of #2, I do not feel comfortable including these
>> changes in this patch set. I feel they would require a patch set of
>> their own.
>>
>> However #1 seems like something possible I would start by this option if
>> that's fine with you ?
>
> Yes.
>
>>
>> Also, I can still do the refactoring before this patch but it will
>> require more work since I'll have to diff the functions moved etc.. do
>> you feel it's required to do so or the refactoring could be done after
>> this patch ?
>
> I prefer doing the refactor first, and separately, because after this
> refactor, your patch #8 will be simplified a lot. In this series, we
> want to share the code on arm software single step, however, registers
> are accessed through frame in GDB side, while through regcache in
> GDBserver. In order to share code, we should unify them as much as we
> can, that is, access registers through regcache as well in GDB side.
> Then, we can move the code from arm-tdep.c to arch/ directory, to
> support software single step in GDBserver.
>

Yes ok I'll do it this way then.