This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 08/10] Support software single step on ARM in GDBServer.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Nov 2015 16:03:52 +0000
- Subject: Re: [PATCH v3 08/10] Support software single step on ARM in GDBServer.
- Authentication-results: sourceware.org; auth=none
- References: <1448287968-12907-1-git-send-email-antoine dot tremblay at ericsson dot com> <1448287968-12907-9-git-send-email-antoine dot tremblay at ericsson dot com> <86ziy1vsdr dot fsf at gmail dot com> <5657213B dot 30504 at ericsson dot com>
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
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.
--
Yao (éå)