This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 2/2] Support single step by arch or target
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, <gdb-patches at sourceware dot org>
- Date: Tue, 01 Sep 2015 15:23:09 +0100
- Subject: Re: [PATCH 2/2] Support single step by arch or target
- Authentication-results: sourceware.org; auth=none
- References: <1441096915-23615-1-git-send-email-yao dot qi at linaro dot org> <1441096915-23615-3-git-send-email-yao dot qi at linaro dot org> <55E5A5A9 dot 4030603 at ericsson dot com>
Antoine Tremblay <firstname.lastname@example.org> writes:
> Could we name this can_hardware_single_step instead ? Since the target
> may be able to software single step (in gdbserver). And thus it would
> be confusing...It would also be more consistent with the
> supports_hardware_single_step hook ?
If GDBserver can do software single step, this hook should return true
as well. Hardware single step and software single step in GDBserver
should make no difference to GDB.
>> --- a/gdb/arm-linux-tdep.c
>> +++ b/gdb/arm-linux-tdep.c
>> @@ -917,6 +917,11 @@ arm_linux_software_single_step (struct frame_info *frame)
>> if (arm_deal_with_atomic_sequence (frame))
>> return 1;
>> + /* If the target does have hardware single step, GDB doesn't have
>> + to bother software single step. */
>> + if (target_can_do_single_step () == 1)
>> + return 0;
>> next_pc = arm_get_next_pc (frame, get_frame_pc (frame));
>> /* The Linux kernel offers some user-mode helpers in a high page. We can
> target_can_do_single_step () should be before
> arm_deal_with_atomic_sequence ...
I am not sure we can do single step (via hardware and linux kernel)
for arm atomic sequence , but we can't do that for aarch64, see