This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Don't call set_gdbarch_cannot_step_breakpoint in aarch64_gdbarch_init
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Fri, 20 Mar 2015 17:43:01 +0000
- Subject: Re: [PATCH] Don't call set_gdbarch_cannot_step_breakpoint in aarch64_gdbarch_init
- Authentication-results: sourceware.org; auth=none
- References: <1426594867-21302-1-git-send-email-qiyaoltc at gmail dot com>
Hi Yao,
On 03/17/2015 12:21 PM, Yao Qi wrote:
> From: Yao Qi <yao.qi@linaro.org>
>
> Hi,
> I am looking at the following fails in aarch64-linux,
>
> stepi^M
> 47 NOP; /* after permanent bp */^M
> (gdb) FAIL: gdb.base/bp-permanent.exp: always_inserted=off, sw_watchpoint=0: stepi signal with handler: single-step to handler
>
> the test expects GDB single step into signal handler, but GDB doesn't.
> The code in infrun.c:resume
>
> /* Most targets can step a breakpoint instruction, thus
> executing it normally. But if this one cannot, just
> continue and we will hit it anyway. */
> if (gdbarch_cannot_step_breakpoint (gdbarch))
> step = 0;
>
> change the intended action from "step" to "continue". The gdbarch method
> cannot_step_breakpoint isn't documented well, and I don't get much clue
> after explore the history. However, from the comments above,
> aarch64-linux can step a breakpoint instruction, so don't need to call
> set_gdbarch_cannot_step_breakpoint.
I wondered about this before too. Thanks for cleaning this up.
Thanks,
Pedro Alves