Don't call set_gdbarch_cannot_step_breakpoint in aarch64_gdbarch_init
authorYao Qi <yao.qi@linaro.org>
Fri, 20 Mar 2015 10:15:21 +0000 (10:15 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 20 Mar 2015 10:15:21 +0000 (10:15 +0000)
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.

gdb:

2015-03-20  Yao Qi  <yao.qi@linaro.org>

* aarch64-tdep.c (aarch64_gdbarch_init): Don't call
set_gdbarch_cannot_step_breakpoint.

gdb/ChangeLog
gdb/aarch64-tdep.c

index a8b8850f7f663721f91d8d424b63a175f7a34592..ad074c36763a75bdb1993840f336ad5a84d113b1 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-20  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
+       set_gdbarch_cannot_step_breakpoint.
+
 2015-03-19  Pedro Alves  <palves@redhat.com>
 
        * linux-nat.c (linux_resume_one_lwp): Rename to ...
index 472ce703e5ca3beec5a1216c3d65f4e4bdd9febb..ddc902250ecbfc6d717db7e2f32f43c615abe583 100644 (file)
@@ -2698,7 +2698,6 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   /* Breakpoint manipulation.  */
   set_gdbarch_breakpoint_from_pc (gdbarch, aarch64_breakpoint_from_pc);
-  set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
   set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
   set_gdbarch_software_single_step (gdbarch, aarch64_software_single_step);
 
This page took 0.028327 seconds and 4 git commands to generate.